File tree Expand file tree Collapse file tree 2 files changed +17
-0
lines changed
Expand file tree Collapse file tree 2 files changed +17
-0
lines changed Original file line number Diff line number Diff line change 11# QOwnNotes Changelog
22
3+ ## 26.3.10
4+
5+ - Improved portal handle token generation compatibility for older Qt5
6+ distributions (e.g. Debian 9.0, SLE 15) by using `QUuid` on Qt5 and
7+ keeping `QRandomGenerator` on Qt6 builds
8+ (for [#2462](https://github.com/pbek/QOwnNotes/issues/2462))
9+
310## 26.3.9
411
512- Fixed heading order in the Navigation panel's "Headings" tab to keep the
Original file line number Diff line number Diff line change 2121#include < QDBusReply>
2222#include < QDebug>
2323#include < QGuiApplication>
24+ #if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
2425#include < QRandomGenerator>
26+ #else
27+ #include < QUuid>
28+ #endif
2529
2630XdgGlobalShortcutManager::XdgGlobalShortcutManager (QObject *parent) : QObject(parent) {
2731 // Register D-Bus metatypes for the a(sa{sv}) shortcut list argument
@@ -399,7 +403,13 @@ QString XdgGlobalShortcutManager::qtKeyToXkbName(int key) {
399403}
400404
401405QString XdgGlobalShortcutManager::generateToken () {
406+ #if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
402407 return QStringLiteral (" qownnotes_%1" ).arg (QRandomGenerator::global ()->generate ());
408+ #else
409+ QString token = QUuid::createUuid ().toString (QUuid::WithoutBraces);
410+ token.remove (QLatin1Char (' -' ));
411+ return QStringLiteral (" qownnotes_%1" ).arg (token);
412+ #endif
403413}
404414
405415QString XdgGlobalShortcutManager::computeRequestPath (const QString &handleToken) const {
You can’t perform that action at this time.
0 commit comments