From 1344b7f2db5d9158e94614bccc2298a15fac5ef4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jonah=20Br=C3=BCchert?= <jbb@kaidan.im>
Date: Fri, 12 May 2023 21:10:17 +0200
Subject: [PATCH] Only set the QtQuick Controls Style on Qt5 (#140)
---
src/theme/qgnomeplatformtheme.cpp | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/src/theme/qgnomeplatformtheme.cpp b/src/theme/qgnomeplatformtheme.cpp
index ef395a1..99719a6 100644
--- a/src/theme/qgnomeplatformtheme.cpp
+++ b/src/theme/qgnomeplatformtheme.cpp
@@ -102,18 +102,17 @@ QGnomePlatformTheme::QGnomePlatformTheme()
return;
}
- // Unfortunately we only have a way to check this on Qt5
- // On Qt6 this should just fall back to the Fusion style automatically.
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
+ // Unfortunately we only have a way to check this on Qt5
if (!QQuickStyle::availableStyles().contains(QStringLiteral("org.kde.desktop"))) {
qCWarning(QGnomePlatformThemeLog) << "The desktop style for QtQuick Controls 2 applications"
<< "is not available on the system (qqc2-desktop-style)."
<< "The application may look broken.";
return;
}
-#endif
QQuickStyle::setStyle(QStringLiteral("org.kde.desktop"));
+#endif
}
QGnomePlatformTheme::~QGnomePlatformTheme()