Skip to content

Commit

Permalink
fix: Qt6.9 QString stricter .arg matching
Browse files Browse the repository at this point in the history
(Hopefully) fixes #14071
  • Loading branch information
Swiftb0y committed Jan 7, 2025
1 parent 8a6fd71 commit 355eb9c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions src/engine/sidechain/enginerecord.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -224,9 +224,9 @@ void EngineRecord::process(const CSAMPLE* pBuffer, const int iBufferSize) {
}

QString EngineRecord::getRecordedDurationStr() {
return QString("%1:%2")
.arg(m_recordedDuration / 60, 2, 'f', 0, '0') // minutes
.arg(m_recordedDuration % 60, 2, 'f', 0, '0'); // seconds
return QStringLiteral("%1:%2")
.arg(m_recordedDuration / 60, 2, 10, QChar('0')) // minutes
.arg(m_recordedDuration % 60, 2, 10, QChar('0')); // seconds
}

void EngineRecord::writeCueLine() {
Expand Down
6 changes: 3 additions & 3 deletions src/recording/recordingmanager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -209,9 +209,9 @@ void RecordingManager::slotDurationRecorded(quint64 duration) {

// Copy from the implementation in enginerecord.cpp
QString RecordingManager::getRecordedDurationStr(unsigned int duration) {
return QString("%1:%2")
.arg(duration / 60, 2, 'f', 0, '0') // minutes
.arg(duration % 60, 2, 'f', 0, '0'); // seconds
return QStringLiteral("%1:%2")
.arg(duration / 60, 2, 10, QChar('0')) // minutes
.arg(duration % 60, 2, 10, QChar('0')); // seconds
}

// Only called when recording is active.
Expand Down

0 comments on commit 355eb9c

Please sign in to comment.