Add missing QQuickStyle::setStyle calls
Calls `QQuickStyle::setStyle("breeze")` everywhere we were calling `QApplication::setStyle("org.kde.desktop")`.
This commit is contained in:
parent
10368df021
commit
475a4c2ca8
4 changed files with 14 additions and 0 deletions
|
@ -11,6 +11,7 @@ target_link_libraries(kcm_kdeconnect
|
|||
Qt::Core
|
||||
Qt::Gui
|
||||
Qt::QuickWidgets
|
||||
Qt::QuickControls2
|
||||
KF6::I18n
|
||||
KF6::KCMUtils
|
||||
kdeconnectinterfaces
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
|
||||
#include <QQmlContext>
|
||||
#include <QQuickItem>
|
||||
#include <QQuickStyle>
|
||||
|
||||
#include "dbushelpers.h"
|
||||
#include "dbusinterfaces.h"
|
||||
|
@ -51,6 +52,11 @@ KdeConnectKcm::KdeConnectKcm(QObject *parent, const KPluginMetaData &md, const Q
|
|||
QApplication::setStyle(QStringLiteral("breeze"));
|
||||
#endif
|
||||
|
||||
// Default to org.kde.desktop style unless the user forces another style
|
||||
if (qEnvironmentVariableIsEmpty("QT_QUICK_CONTROLS_STYLE")) {
|
||||
QQuickStyle::setStyle(QStringLiteral("org.kde.desktop"));
|
||||
}
|
||||
|
||||
kcmUi.setupUi(widget());
|
||||
|
||||
sortProxyModel = new DevicesSortProxyModel(devicesModel);
|
||||
|
|
|
@ -12,6 +12,7 @@ target_link_libraries(kdeconnect-handler
|
|||
kdeconnectcore
|
||||
kdeconnectversion
|
||||
Qt::Widgets
|
||||
Qt::QuickControls2
|
||||
KF6::CoreAddons
|
||||
KF6::ConfigWidgets
|
||||
KF6::DBusAddons
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
#include <QDialog>
|
||||
#include <QFileDialog>
|
||||
#include <QMessageBox>
|
||||
#include <QQuickStyle>
|
||||
#include <QTextStream>
|
||||
#include <QUrl>
|
||||
|
||||
|
@ -59,6 +60,11 @@ int main(int argc, char **argv)
|
|||
QApplication::setStyle(QStringLiteral("breeze"));
|
||||
#endif
|
||||
|
||||
// Default to org.kde.desktop style unless the user forces another style
|
||||
if (qEnvironmentVariableIsEmpty("QT_QUICK_CONTROLS_STYLE")) {
|
||||
QQuickStyle::setStyle(QStringLiteral("org.kde.desktop"));
|
||||
}
|
||||
|
||||
QUrl urlToShare;
|
||||
bool open;
|
||||
QString deviceId;
|
||||
|
|
Loading…
Reference in a new issue