aboutsummaryrefslogtreecommitdiffstats
path: root/src/quicktemplates2/qquicktheme_p_p.h
diff options
context:
space:
mode:
authorJ-P Nurmi <jpnurmi@qt.io>2018-02-22 23:29:44 +0100
committerJ-P Nurmi <jpnurmi@qt.io>2018-02-27 11:19:37 +0000
commitcf0905a25cc02a1ad2a242319e7ad9748c0a64f3 (patch)
treeca40c76cc7974de2d5cbf00bd9c7c7cfe2268899 /src/quicktemplates2/qquicktheme_p_p.h
parent0836a69bdf84c7f0d63ef081c838b98bb38de41e (diff)
QQuickTheme: don't inherit QPlatformTheme
Use QPlatformTheme as a fallback instead of inheriting from it. This way, Qt Quick Controls 2 themes don't mess up the fonts and palettes of Qt Quick Controls 1 and Qt Widgets applications. Note: QQuickTheme::Font and QQuickTheme::Palette enums are copies of the respective enums in QPlatformTheme, for now. This is the simplest first step, but later on, we can have our own set of enums that cover controls, such as Switch, that were previously entirely missing from QPlatformTheme. Task-number: QTBUG-51921 Change-Id: I8efe0ba2d03d65bc12b55b533ba9f2fab5320348 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'src/quicktemplates2/qquicktheme_p_p.h')
-rw-r--r--src/quicktemplates2/qquicktheme_p_p.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/quicktemplates2/qquicktheme_p_p.h b/src/quicktemplates2/qquicktheme_p_p.h
index 5c20610d..b8cdc4aa 100644
--- a/src/quicktemplates2/qquicktheme_p_p.h
+++ b/src/quicktemplates2/qquicktheme_p_p.h
@@ -60,6 +60,7 @@ public:
return theme->d_func();
}
+ static QScopedPointer<QQuickTheme> current;
QScopedPointer<const QFont> defaultFont;
QScopedPointer<const QPalette> defaultPalette;
};