diff options
author | J-P Nurmi <jpnurmi@qt.io> | 2018-02-13 22:03:31 +0100 |
---|---|---|
committer | J-P Nurmi <jpnurmi@qt.io> | 2018-02-15 08:48:44 +0000 |
commit | 544456ea001c1a2ea7917cc4923222c8dc72f41f (patch) | |
tree | e40389e506776337e9f1ecb79cadce61a9d16e1b /src/quickcontrols2/qquickstyleplugin_p.h | |
parent | 71d5afa10c297db4aabd032f992fb93fbaaf5470 (diff) |
Read :/qtquickcontrols2.conf in QQuickStylePlugin
QQuickTheme is going to be promoted from libQQC2 to libQQT2 so that it
can provide dark and light palettes (and later, icons). The first step
is to refactor out the :/qtquickcontrols2.conf reading code, which
cannot be in style-agnostic libQQT2. Read the conf file in QQuickStyle
Plugin instead. The additional benefit is that we don't need duplicate
name() methods for styles and their themes. Even though QQuickStyle
Plugin's name handling is case-insensitive, QSetting is case-sensitive.
Therefore all QQuickStylePlugin::name() overrides have been updated
to use capital first letter. This name is used to lookup the correct
section in :/qtquickcontrols2.conf.
Task-number: QTBUG-63331
Change-Id: I07b1269d9dbc2c9568e6f22f2da75951fde7b669
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'src/quickcontrols2/qquickstyleplugin_p.h')
-rw-r--r-- | src/quickcontrols2/qquickstyleplugin_p.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/quickcontrols2/qquickstyleplugin_p.h b/src/quickcontrols2/qquickstyleplugin_p.h index 9457b472..24f8e564 100644 --- a/src/quickcontrols2/qquickstyleplugin_p.h +++ b/src/quickcontrols2/qquickstyleplugin_p.h @@ -54,7 +54,7 @@ QT_BEGIN_NAMESPACE -class QQuickProxyTheme; +class QQuickTheme; class Q_QUICKCONTROLS2_PRIVATE_EXPORT QQuickStylePlugin : public QQmlExtensionPlugin { @@ -69,12 +69,12 @@ public: bool isCurrent() const; virtual QString name() const; - virtual QQuickProxyTheme *createTheme() const; + virtual QQuickTheme *createTheme() const; QUrl typeUrl(const QString &name = QString()) const; private: - QScopedPointer<QQuickProxyTheme> m_theme; + QScopedPointer<QQuickTheme> m_theme; }; QT_END_NAMESPACE |