Skip to content

Commit

Permalink
Merge pull request #4372 from Be-ing/qstring_midref
Browse files Browse the repository at this point in the history
use QString::mid instead of QString::midRef
  • Loading branch information
uklotzde authored Oct 12, 2021
2 parents 15805bc + 38d6394 commit 2a0b951
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/dialog/dlgkeywheel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,12 @@ void DlgKeywheel::updateSvg() {

if (text.isText()) {
QDomText textNode = text.toText();
ChromaticKey key = static_cast<ChromaticKey>(id.midRef(2).toInt());
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
const int keyInt = QStringView(id).sliced(2).toInt();
#else
const int keyInt = id.midRef(2).toInt();
#endif
ChromaticKey key = static_cast<ChromaticKey>(keyInt);
QString keyString = KeyUtils::keyToString(key, m_notation);
textNode.setData(keyString);
}
Expand Down

0 comments on commit 2a0b951

Please sign in to comment.