Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge 2.4 to 2.5 #13564

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ default_language_version:
rust: 1.64.0
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
rev: v4.6.0
hooks:
- id: fix-byte-order-marker
exclude: ^.*(\.cbproj|\.groupproj|\.props|\.sln|\.vcxproj|\.vcxproj.filters|UTF-8-BOM.txt)$
Expand All @@ -51,7 +51,7 @@ repos:
# protect main and any branch that has a semver-like name
args: [-b, main, -p, '^\d+\.\d+(?:\.\d+)?$']
- repo: https://github.com/codespell-project/codespell
rev: v2.2.5
rev: v2.3.0
hooks:
- id: codespell
args:
Expand All @@ -66,7 +66,7 @@ repos:
]
exclude: ^(packaging/wix/LICENSE.rtf.in|src/dialog/dlgabout\.cpp|.*\.(?:pot?|(?<!d\.)ts|wxl|svg))$
- repo: https://github.com/pre-commit/mirrors-eslint
rev: v8.48.0
rev: v9.8.0
hooks:
- id: eslint
args: [--fix, --report-unused-disable-directives]
Expand Down Expand Up @@ -96,35 +96,35 @@ repos:
- clang-format==16.0.6
files: \.(c|cc|cxx|cpp|frag|glsl|h|hpp|hxx|ih|ispc|ipp|java|m|mm|proto|vert)$
- repo: https://github.com/psf/black
rev: 23.7.0
rev: 24.4.2
hooks:
- id: black
files: ^tools/.*$
- repo: https://github.com/pycqa/flake8
rev: "6.1.0"
rev: "7.1.0"
hooks:
- id: flake8
files: ^tools/.*$
types: [text, python]
- repo: https://github.com/shellcheck-py/shellcheck-py
rev: v0.9.0.5
rev: v0.10.0.1
hooks:
- id: shellcheck
- repo: https://github.com/DavidAnson/markdownlint-cli2
rev: v0.9.2
rev: v0.13.0
hooks:
- id: markdownlint-cli2
- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.26.3
rev: 0.29.1
hooks:
- id: check-github-workflows
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v3.0.2
rev: v4.0.0-alpha.8
hooks:
- id: prettier
types: [yaml]
- repo: https://github.com/qarmin/qml_formatter.git
rev: 0.2.0
rev: 37c2513b1b8275a475a160ed2f5b044910335d5f # No release tag yet including #6 fix
hooks:
- id: qml_formatter
- repo: local
Expand Down
5 changes: 1 addition & 4 deletions src/analyzer/analyzersilence.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,6 @@ SINT AnalyzerSilence::findFirstSoundInChunk(std::span<const CSAMPLE> samples) {
SINT AnalyzerSilence::findLastSoundInChunk(std::span<const CSAMPLE> samples) {
// -1 is required, because the distance from the fist sample index (0) to crend() is 1,
SINT ret = std::distance(first_sound(samples.rbegin(), samples.rend()), samples.rend()) - 1;
if (ret == -1) {
ret = samples.size();
}
return ret;
}

Expand Down Expand Up @@ -98,7 +95,7 @@ bool AnalyzerSilence::processSamples(const CSAMPLE* pIn, SINT count) {
}
if (m_signalStart >= 0) {
const SINT lastSoundSample = findLastSoundInChunk(samples);
if (lastSoundSample < count - 1) { // not only sound or silence
if (lastSoundSample >= 0) {
m_signalEnd = m_framesProcessed + lastSoundSample / m_channelCount + 1;
}
}
Expand Down
6 changes: 5 additions & 1 deletion src/library/export/engineprimeexportjob.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -563,7 +563,11 @@ void EnginePrimeExportJob::run() {
qWarning() << "Failed to export track"
<< m_pLastLoadedTrack->getId().toString() << ":"
<< e.what();
m_lastErrorMessage = e.what();
//: %1 is the artist %2 is the title and %3 is the original error message
m_lastErrorMessage = tr("Failed to export track %1 - %2:\n%3")
.arg(m_pLastLoadedTrack->getArtist(),
m_pLastLoadedTrack->getTitle(),
e.what());
emit failed(m_lastErrorMessage);
return;
}
Expand Down
4 changes: 1 addition & 3 deletions src/library/export/libraryexporter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,7 @@ void LibraryExporter::beginEnginePrimeExport(
&EnginePrimeExportJob::failed,
this,
[](const QString& message) {
QMessageBox::critical(nullptr,
tr("Export Failed"),
QString{tr("Export failed: %1")}.arg(message));
QMessageBox::critical(nullptr, tr("Export Failed"), message);
});

// Construct a dialog to monitor job progress and offer cancellation.
Expand Down
Loading