fix: build issue on Qt 6.9
This commit is contained in:
parent
84283a1b13
commit
12bcc1a4d6
2 changed files with 12 additions and 2 deletions
|
|
@ -207,8 +207,14 @@ QString KeySequence::keyToString(int key)
|
||||||
}
|
}
|
||||||
|
|
||||||
// representable in ucs2?
|
// representable in ucs2?
|
||||||
if (key < 0x10000)
|
if (key < 0x10000) {
|
||||||
return QString("\\u%1").arg(QChar(key).toLower().unicode(), 4, 16, QChar('0'));
|
#if QT_VERSION >= QT_VERSION_CHECK(6, 9, 0)
|
||||||
|
const uint16_t keyHex = QChar(key).toLower().unicode();
|
||||||
|
return QString("\\u%1").arg(keyHex, kStrSize, kBase, kFillChar);
|
||||||
|
#else
|
||||||
|
return QString("\\u%1").arg(QChar(key).toLower().unicode(), kStrSize, kBase, kFillChar);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
// give up, deskflow probably won't handle this
|
// give up, deskflow probably won't handle this
|
||||||
return "";
|
return "";
|
||||||
|
|
|
||||||
|
|
@ -58,5 +58,9 @@ private:
|
||||||
int m_Modifiers;
|
int m_Modifiers;
|
||||||
bool m_IsValid;
|
bool m_IsValid;
|
||||||
|
|
||||||
|
inline static const int kStrSize = 4;
|
||||||
|
inline static const int kBase = 16;
|
||||||
|
inline static const QChar kFillChar = QChar('0');
|
||||||
|
|
||||||
static QString keyToString(int key);
|
static QString keyToString(int key);
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue