Fix a crash in QFactoryLoader
authorJonas Rabbe <jonas.rabbe@nokia.com>
Wed, 28 Mar 2012 02:07:19 +0000 (12:07 +1000)
committerQt by Nokia <qt-info@nokia.com>
Thu, 29 Mar 2012 11:58:13 +0000 (13:58 +0200)
commit5185a28139800a9fef49dabc6c110e017f83cdd6
treed2cf684c09969392847e07a7038a64eb91980855
parentd3c6664fb070f3a0a2ca26206478834a3810089e
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>
13 files changed:
src/corelib/plugin/qfactoryloader.cpp
tests/auto/corelib/plugin/plugin.pro
tests/auto/corelib/plugin/qfactoryloader/plugin1/plugin1.cpp [new file with mode: 0644]
tests/auto/corelib/plugin/qfactoryloader/plugin1/plugin1.h [new file with mode: 0644]
tests/auto/corelib/plugin/qfactoryloader/plugin1/plugin1.pro [new file with mode: 0644]
tests/auto/corelib/plugin/qfactoryloader/plugin1/plugininterface1.h [new file with mode: 0644]
tests/auto/corelib/plugin/qfactoryloader/plugin2/plugin2.cpp [new file with mode: 0644]
tests/auto/corelib/plugin/qfactoryloader/plugin2/plugin2.h [new file with mode: 0644]
tests/auto/corelib/plugin/qfactoryloader/plugin2/plugin2.pro [new file with mode: 0644]
tests/auto/corelib/plugin/qfactoryloader/plugin2/plugininterface2.h [new file with mode: 0644]
tests/auto/corelib/plugin/qfactoryloader/qfactoryloader.pro [new file with mode: 0644]
tests/auto/corelib/plugin/qfactoryloader/test/test.pro [new file with mode: 0644]
tests/auto/corelib/plugin/qfactoryloader/tst_qfactoryloader.cpp [new file with mode: 0644]