From 693998517432091e30a28e85d0e6d0346687d01a Mon Sep 17 00:00:00 2001 From: wangfei Date: Tue, 9 Jan 2024 09:55:08 +0800 Subject: [PATCH] chore: ButtonPressKeys is only supported in Qt6 add version control to ButtonPressKeys Log: ButtonPressKeys is only supported in Qt6 --- platformthemeplugin/qdeepintheme.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/platformthemeplugin/qdeepintheme.cpp b/platformthemeplugin/qdeepintheme.cpp index 41c7511a..7af14492 100644 --- a/platformthemeplugin/qdeepintheme.cpp +++ b/platformthemeplugin/qdeepintheme.cpp @@ -633,8 +633,10 @@ QVariant QDeepinTheme::themeHint(QPlatformTheme::ThemeHint hint) const return true; case ShowShortcutsInContextMenus: return false; +#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) case ButtonPressKeys: return QVariant::fromValue(QList({ Qt::Key_Enter, Qt::Key_Return, Qt::Key_Space, Qt::Key_Select } )); +#endif default: break; }