Commit e58d91a5 authored by Nicolas Fella's avatar Nicolas Fella
Browse files

Force using org.kde.desktop style on non-Android

On Plasma this is done via plasma-integration, but on non-Plasma systems
we get the default QML style that is severly broken.

Set the style to org.kde.desktop but allow to override it via env var so
we can get org.kde.breeze on Plasma Mobile.

Also mark it as a dependency in CMake
parent ab8a3a12
...@@ -87,7 +87,7 @@ if (ANDROID) ...@@ -87,7 +87,7 @@ if (ANDROID)
find_package(Gradle REQUIRED) find_package(Gradle REQUIRED)
else() else()
find_package(Qt5 REQUIRED COMPONENTS Widgets DBus) find_package(Qt5 REQUIRED COMPONENTS Widgets DBus)
find_package(KF5 ${KF5_MIN_VERSION} REQUIRED COMPONENTS DBusAddons) find_package(KF5 ${KF5_MIN_VERSION} REQUIRED COMPONENTS DBusAddons QQC2DesktopStyle)
find_package(KF5 ${KF5_MIN_VERSION} OPTIONAL_COMPONENTS Solid Crash) find_package(KF5 ${KF5_MIN_VERSION} OPTIONAL_COMPONENTS Solid Crash)
endif() endif()
if (TARGET KF5::Crash) if (TARGET KF5::Crash)
...@@ -205,6 +205,10 @@ int main(int argc, char **argv) ...@@ -205,6 +205,10 @@ int main(int argc, char **argv)
QQuickStyle::setStyle(QStringLiteral("Material")); QQuickStyle::setStyle(QStringLiteral("Material"));
#else #else
QApplication app(argc, argv); // for native file dialogs QApplication app(argc, argv); // for native file dialogs
// Default to org.kde.desktop style unless the user forces another style
if (qEnvironmentVariableIsEmpty("QT_QUICK_CONTROLS_STYLE")) {
#endif #endif
QGuiApplication::setApplicationDisplayName(i18n("KDE Itinerary")); QGuiApplication::setApplicationDisplayName(i18n("KDE Itinerary"));
QGuiApplication::setWindowIcon(QIcon::fromTheme(QStringLiteral("itinerary"))); QGuiApplication::setWindowIcon(QIcon::fromTheme(QStringLiteral("itinerary")));
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment