summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJonas Rabbe <jonas.rabbe@nokia.com>2012-03-28 12:07:19 +1000
committerQt by Nokia <qt-info@nokia.com>2012-03-29 13:58:13 +0200
commit5185a28139800a9fef49dabc6c110e017f83cdd6 (patch)
treed2cf684c09969392847e07a7038a64eb91980855 /src
parentd3c6664fb070f3a0a2ca26206478834a3810089e (diff)
Fix a crash in QFactoryLoader
The change in plugin loading has meant that different plugins in the same plugin folder will not be handled properly when loaded with different instances of QFactoryLoader. A solution is to only unload compatability plugins from QFactoryLoader::update() since they are the only plugins that are actually loaded in that method. This auto test shows the error on the current version of QFactoryLoader and passes with the fix described above. Change-Id: I12001525d51bb631d6742c5965357598322f247c Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Diffstat (limited to 'src')
-rw-r--r--src/corelib/plugin/qfactoryloader.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/corelib/plugin/qfactoryloader.cpp b/src/corelib/plugin/qfactoryloader.cpp
index 480bc0da74..3f192ea477 100644
--- a/src/corelib/plugin/qfactoryloader.cpp
+++ b/src/corelib/plugin/qfactoryloader.cpp
@@ -188,7 +188,8 @@ void QFactoryLoader::update()
}
if (!metaDataOk) {
- library->unload();
+ if (library->compatPlugin)
+ library->unload();
library->release();
continue;
}