aboutsummaryrefslogtreecommitdiffstats
path: root/src/quicktemplates2/qquicktheme.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/quicktemplates2/qquicktheme.cpp')
-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) {