diff options
author | Mitch Curtis <mitch.curtis@qt.io> | 2020-03-11 17:04:37 +0100 |
---|---|---|
committer | Mitch Curtis <mitch.curtis@qt.io> | 2020-03-12 15:48:34 +0100 |
commit | 7da5842647f75fd990f69f400f75d9b090e39306 (patch) | |
tree | 76559c1c295b6bf7362737c0f1b70c8911c3cefc /src/quickcontrols2/qquickstyleplugin_p.h | |
parent | 92dc998f6d27347842fd57b0a1c6220426eb9ee2 (diff) |
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 <fabian.kosmale@qt.io>
Diffstat (limited to 'src/quickcontrols2/qquickstyleplugin_p.h')
-rw-r--r-- | src/quickcontrols2/qquickstyleplugin_p.h | 1 |
1 files changed, 1 insertions, 0 deletions
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; |