diff options
author | J-P Nurmi <jpnurmi@qt.io> | 2018-05-16 13:50:35 +0200 |
---|---|---|
committer | J-P Nurmi <jpnurmi@qt.io> | 2018-05-22 14:20:49 +0000 |
commit | f40dc11886e8130bad5771ed80920e6e72dfc09e (patch) | |
tree | a5395a9a7efd47e293901f1d7419a1140806c4d4 /tests/auto/qquickapplicationwindow/tst_qquickapplicationwindow.cpp | |
parent | 9338e1285e47060f3998ac19d047e93a11252ffb (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 'tests/auto/qquickapplicationwindow/tst_qquickapplicationwindow.cpp')
-rw-r--r-- | tests/auto/qquickapplicationwindow/tst_qquickapplicationwindow.cpp | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/tests/auto/qquickapplicationwindow/tst_qquickapplicationwindow.cpp b/tests/auto/qquickapplicationwindow/tst_qquickapplicationwindow.cpp index 742ad9fd..ef2d0893 100644 --- a/tests/auto/qquickapplicationwindow/tst_qquickapplicationwindow.cpp +++ b/tests/auto/qquickapplicationwindow/tst_qquickapplicationwindow.cpp @@ -558,15 +558,10 @@ void tst_QQuickApplicationWindow::font() class TestTheme : public QQuickTheme { public: - TestTheme() : m_font("Courier") { } - - const QFont *font(Scope scope) const override + void resolve() override { - Q_UNUSED(scope); - return &m_font; + setFont(System, QFont("Courier")); } - - QFont m_font; }; void tst_QQuickApplicationWindow::defaultFont() |