From 7da5842647f75fd990f69f400f75d9b090e39306 Mon Sep 17 00:00:00 2001 From: Mitch Curtis Date: Wed, 11 Mar 2020 17:04:37 +0100 Subject: Adapt to plugin unloading changes As of c2081016e in qtdeclarative, plugins are no longer unloaded on macOS, and QQmlExtensionPlugin::unregisterTypes() should be used instead. This patch: - Moves everything that was done in destructors to unregisterTypes(). - Ensures that the style selector is destroyed in QQuickStylePlugin::unregisterTypes() so that previous styles that were set do not stick around after qmlClearTypeRegistrations() is called. This ensures that runtime style-switching continues to work. - Adds more logging output to make it easier to diagnose issues in the future. - Adds more code comments to ease maintenance. Change-Id: Ibbfeba4501d6ba0d5a257dcceace3498904a816e Fixes: QTBUG-82811 Reviewed-by: Fabian Kosmale --- src/quickcontrols2/qquickstyleplugin_p.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/quickcontrols2/qquickstyleplugin_p.h') diff --git a/src/quickcontrols2/qquickstyleplugin_p.h b/src/quickcontrols2/qquickstyleplugin_p.h index 6b89926c..67103e12 100644 --- a/src/quickcontrols2/qquickstyleplugin_p.h +++ b/src/quickcontrols2/qquickstyleplugin_p.h @@ -66,6 +66,7 @@ public: virtual QString name() const; virtual void initializeTheme(QQuickTheme *theme); + virtual void unregisterTypes() override; QUrl resolvedUrl(const QString &fileName) const; -- cgit v1.2.3