aboutsummaryrefslogtreecommitdiffstats
path: root/src/quicktemplates2
diff options
context:
space:
mode:
authorQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2019-02-16 03:01:17 +0100
committerQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2019-02-16 03:01:17 +0100
commit3b467b5c5b34795fc4dfcd9cb8822aa3a3d8cf1c (patch)
treef8f1d9f3609595e771e4fd05048a7fa53b59e6f7 /src/quicktemplates2
parent7b48bda18f836671cda6d47d6570fc522a4361ec (diff)
parent0614d792967b7721c692cb273bb5428544fa3680 (diff)
Merge remote-tracking branch 'origin/5.12' into 5.13
Diffstat (limited to 'src/quicktemplates2')
-rw-r--r--src/quicktemplates2/qquicktheme.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/quicktemplates2/qquicktheme.cpp b/src/quicktemplates2/qquicktheme.cpp
index 1ea0cef2..af49ffc9 100644
--- a/src/quicktemplates2/qquicktheme.cpp
+++ b/src/quicktemplates2/qquicktheme.cpp
@@ -44,6 +44,18 @@ QT_BEGIN_NAMESPACE
QScopedPointer<QQuickTheme> QQuickThemePrivate::instance;
+static void cleanup_instance()
+{
+ QQuickThemePrivate::instance.reset();
+}
+
+static void install_instance_cleanuper()
+{
+ qAddPostRoutine(cleanup_instance);
+}
+
+Q_COREAPP_STARTUP_FUNCTION(install_instance_cleanuper)
+
static QPlatformTheme::Font platformFont(QQuickTheme::Scope scope)
{
switch (scope) {