aboutsummaryrefslogtreecommitdiffstats
path: root/src/quicktemplates2/qquicktheme_p.h
diff options
context:
space:
mode:
authorJ-P Nurmi <jpnurmi@qt.io>2018-05-16 13:50:35 +0200
committerJ-P Nurmi <jpnurmi@qt.io>2018-05-22 14:20:49 +0000
commitf40dc11886e8130bad5771ed80920e6e72dfc09e (patch)
treea5395a9a7efd47e293901f1d7419a1140806c4d4 /src/quicktemplates2/qquicktheme_p.h
parent9338e1285e47060f3998ac19d047e93a11252ffb (diff)
QQuickTheme: add setters to make getters non-virtual
This allows us to add more themable attributes (on the side of fonts and palettes) after the QQuickTheme API has been made public, because it won't require adding virtuals. Only the resolve() method is virtual. Task-number: QTBUG-67062 Change-Id: I6a5cc8d15aeaa5a9a0fe9b6d2591077f8822daac Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'src/quicktemplates2/qquicktheme_p.h')
-rw-r--r--src/quicktemplates2/qquicktheme_p.h7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/quicktemplates2/qquicktheme_p.h b/src/quicktemplates2/qquicktheme_p.h
index eb10d766..47f9a166 100644
--- a/src/quicktemplates2/qquicktheme_p.h
+++ b/src/quicktemplates2/qquicktheme_p.h
@@ -91,11 +91,10 @@ public:
static QPalette themePalette(Scope scope);
protected:
- virtual const QFont *font(Scope scope) const;
- virtual const QPalette *palette(Scope scope) const;
+ void setFont(Scope scope, const QFont &font);
+ void setPalette(Scope scope, const QPalette &palette);
- virtual void resolveFonts(const QFont &defaultFont);
- virtual void resolvePalettes(const QPalette &defaultPalette);
+ virtual void resolve();
private:
Q_DISABLE_COPY(QQuickTheme)