Skip to content
Merged
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
2 changes: 1 addition & 1 deletion .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ jobs:
id: get-deps
uses: ./.github/actions/install-dependencies
with:
qt-version: 6.8.2
qt-version: 6.9.0
qt-install-dir: ${{matrix.target.qt-install-dir}}
like: ${{ matrix.target.like }}

Expand Down
10 changes: 8 additions & 2 deletions src/lib/gui/KeySequence.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -207,8 +207,14 @@ QString KeySequence::keyToString(int key)
}

// representable in ucs2?
if (key < 0x10000)
return QString("\\u%1").arg(QChar(key).toLower().unicode(), 4, 16, QChar('0'));
if (key < 0x10000) {
#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
return "";
Expand Down
4 changes: 4 additions & 0 deletions src/lib/gui/KeySequence.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,5 +58,9 @@ class KeySequence
int m_Modifiers;
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);
};