diff --git a/startkde/startkde.cmake b/startkde/startkde.cmake --- a/startkde/startkde.cmake +++ b/startkde/startkde.cmake @@ -97,9 +97,18 @@ #Set the QtQuickControls style to our own: for QtQuickControls1 #it will fall back to Desktop, while it will use our own org.kde.desktop #for QtQuickControlsStyle and Kirigami -export QT_QUICK_CONTROLS_1_STYLE=Desktop export QT_QUICK_CONTROLS_STYLE=org.kde.desktop +# For Qt Quick Controls 1, there is no style with that name, +# so override that explicitly with the default style to avoid +# a warning on startup. However, simply setting it to "Desktop" does +# not work, as QQuickControlSettings1 somehow messes that up and uses +# the parent directory as import path, resulting in the wrong style "Base" +# being used instead of the right one. +# We can work around that by supplying a relative path to a nonexistent +# directory, as it only looks at the file name in the end anyway... +export QT_QUICK_CONTROLS_1_STYLE=non/existent/dir/Desktop + # XCursor mouse theme needs to be applied here to work even for kded or ksmserver if test -n "$kcminputrc_mouse_cursortheme" -o -n "$kcminputrc_mouse_cursorsize" ; then @EXPORT_XCURSOR_PATH@ diff --git a/startkde/startplasma.cmake b/startkde/startplasma.cmake --- a/startkde/startplasma.cmake +++ b/startkde/startplasma.cmake @@ -52,9 +52,18 @@ #Set the QtQuickControls style to our own: for QtQuickControls1 #it will fall back to Desktop, while it will use our own org.kde.desktop #for QtQuickControlsStyle and Kirigami -export QT_QUICK_CONTROLS_1_STYLE=Desktop export QT_QUICK_CONTROLS_STYLE=org.kde.desktop +# For Qt Quick Controls 1, there is no style with that name, +# so override that explicitly with the default style to avoid +# a warning on startup. However, simply setting it to "Desktop" does +# not work, as QQuickControlSettings1 somehow messes that up and uses +# the parent directory as import path, resulting in the wrong style "Base" +# being used instead of the right one. +# We can work around that by supplying a relative path to a nonexistent +# directory, as it only looks at the file name in the end anyway... +export QT_QUICK_CONTROLS_1_STYLE=non/existent/dir/Desktop + #In wayland we want Plasma to use Qt's scaling export PLASMA_USE_QT_SCALING=1