diff options
author | Janne Koskinen <janne.p.koskinen@qt.io> | 2021-05-27 15:33:38 +0300 |
---|---|---|
committer | Janne Koskinen <janne.p.koskinen@qt.io> | 2021-05-28 12:58:09 +0300 |
commit | 439b70ffb3db26a1ef3a2e0ef7f53d367b119898 (patch) | |
tree | c48a2283a216122ab7fa8faa07f64aa28517a787 /src/qml/qml/qqmlimport.cpp | |
parent | 5195163bcb0be9e5a13c940cbe324ca9f8be6145 (diff) |
Fix build without library configuration
QPluginloader has no instance() function with no library
Change-Id: If74572f9bf4e7d3db3406a021dfcc77a348efb59
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
Diffstat (limited to 'src/qml/qml/qqmlimport.cpp')
-rw-r--r-- | src/qml/qml/qqmlimport.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/qml/qml/qqmlimport.cpp b/src/qml/qml/qqmlimport.cpp index 1d2d0d15cd..29f366d5bc 100644 --- a/src/qml/qml/qqmlimport.cpp +++ b/src/qml/qml/qqmlimport.cpp @@ -208,15 +208,17 @@ static bool unloadPlugin(const std::pair<const QString, QmlPlugin> &plugin) if (!loader) return false; +#if QT_CONFIG(library) if (auto extensionPlugin = qobject_cast<QQmlExtensionPlugin *>(loader->instance())) extensionPlugin->unregisterTypes(); -#if QT_CONFIG(library) && !defined(Q_OS_MACOS) +# ifndef Q_OS_MACOS if (!loader->unload()) { qWarning("Unloading %s failed: %s", qPrintable(plugin.first), qPrintable(loader->errorString())); return false; } +# endif #endif return true; |