From 9338e1285e47060f3998ac19d047e93a11252ffb Mon Sep 17 00:00:00 2001 From: J-P Nurmi Date: Tue, 15 May 2018 23:29:46 +0200 Subject: Rename QQuickTheme::current to instance Avoid giving a wrong impression that the theme instance could be changed on the fly. Change-Id: Ifb5078422385d2f15da6a416d89cc9d6f46b0f40 Reviewed-by: Mitch Curtis --- tests/auto/font/tst_font.cpp | 4 ++-- tests/auto/palette/tst_palette.cpp | 4 ++-- tests/auto/qquickapplicationwindow/tst_qquickapplicationwindow.cpp | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) (limited to 'tests/auto') diff --git a/tests/auto/font/tst_font.cpp b/tests/auto/font/tst_font.cpp index eb37857a..048739ff 100644 --- a/tests/auto/font/tst_font.cpp +++ b/tests/auto/font/tst_font.cpp @@ -45,7 +45,7 @@ #include #include #include -#include +#include using namespace QQuickVisualTestUtil; @@ -305,7 +305,7 @@ void tst_font::defaultFont() // The call to setData() above causes QQuickDefaultTheme to be set as the current theme, // so we must make sure we only set our theme afterwards. - QQuickTheme::setCurrent(new TestFontTheme); + QQuickThemePrivate::instance.reset(new TestFontTheme); QScopedPointer object(component.create()); QVERIFY2(!object.isNull(), qPrintable(component.errorString())); diff --git a/tests/auto/palette/tst_palette.cpp b/tests/auto/palette/tst_palette.cpp index 1b1f5168..4c067e17 100644 --- a/tests/auto/palette/tst_palette.cpp +++ b/tests/auto/palette/tst_palette.cpp @@ -45,7 +45,7 @@ #include #include #include -#include +#include using namespace QQuickVisualTestUtil; @@ -301,7 +301,7 @@ void tst_palette::defaultPalette() // The call to setData() above causes QQuickDefaultTheme to be set as the current theme, // so we must make sure we only set our theme afterwards. - QQuickTheme::setCurrent(new TestTheme); + QQuickThemePrivate::instance.reset(new TestTheme); QScopedPointer object(component.create()); QVERIFY2(!object.isNull(), qPrintable(component.errorString())); diff --git a/tests/auto/qquickapplicationwindow/tst_qquickapplicationwindow.cpp b/tests/auto/qquickapplicationwindow/tst_qquickapplicationwindow.cpp index 1700829c..742ad9fd 100644 --- a/tests/auto/qquickapplicationwindow/tst_qquickapplicationwindow.cpp +++ b/tests/auto/qquickapplicationwindow/tst_qquickapplicationwindow.cpp @@ -50,7 +50,7 @@ #include #include #include -#include +#include #include "../shared/util.h" #include "../shared/visualtestutil.h" @@ -571,7 +571,7 @@ public: void tst_QQuickApplicationWindow::defaultFont() { - QQuickTheme::setCurrent(new TestTheme); + QQuickThemePrivate::instance.reset(new TestTheme); QQmlEngine engine; QQmlComponent component(&engine); -- cgit v1.2.3