diff --git a/src/dialog/dlgkeywheel.cpp b/src/dialog/dlgkeywheel.cpp index e05e075f55d..b7a3dc35027 100644 --- a/src/dialog/dlgkeywheel.cpp +++ b/src/dialog/dlgkeywheel.cpp @@ -155,7 +155,13 @@ void DlgKeywheel::updateSvg() { if (text.isText()) { QDomText textNode = text.toText(); - ChromaticKey key = static_cast(id.midRef(2).toInt()); + QStringView idView(id); +#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) + idView = idView.sliced(2, idView.size() - 2); +#else + idView = idView.mid(2); +#endif + ChromaticKey key = static_cast(idView.toInt()); QString keyString = KeyUtils::keyToString(key, m_notation); textNode.setData(keyString); }