summaryrefslogtreecommitdiffstats
path: root/tests/auto/corelib/plugin
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/corelib/plugin')
-rw-r--r--tests/auto/corelib/plugin/qlibrary/tst_qlibrary.cpp11
-rw-r--r--tests/auto/corelib/plugin/qpluginloader/tst_qpluginloader.cpp6
2 files changed, 14 insertions, 3 deletions
diff --git a/tests/auto/corelib/plugin/qlibrary/tst_qlibrary.cpp b/tests/auto/corelib/plugin/qlibrary/tst_qlibrary.cpp
index d60e1514b9..2244f3e041 100644
--- a/tests/auto/corelib/plugin/qlibrary/tst_qlibrary.cpp
+++ b/tests/auto/corelib/plugin/qlibrary/tst_qlibrary.cpp
@@ -456,10 +456,21 @@ void tst_QLibrary::loadHints()
if (int(loadHints) != 0) {
lh |= library.loadHints();
library.setLoadHints(lh);
+
+ // confirm that another QLibrary doesn't get affected - QTBUG-39642
+ QCOMPARE(QLibrary().loadHints(), QLibrary::LoadHints());
}
library.setFileName(lib);
QCOMPARE(library.loadHints(), lh);
bool ok = library.load();
+
+ // we can't change the hints anymore
+ library.setLoadHints(QLibrary::LoadHints());
+ QCOMPARE(library.loadHints(), lh);
+
+ // confirm that a new QLibrary inherits the hints too
+ QCOMPARE(QLibrary(lib).loadHints(), lh);
+
if ( result ) {
QVERIFY( ok );
QVERIFY(library.unload());
diff --git a/tests/auto/corelib/plugin/qpluginloader/tst_qpluginloader.cpp b/tests/auto/corelib/plugin/qpluginloader/tst_qpluginloader.cpp
index 351e3a23e0..4447eb7a0b 100644
--- a/tests/auto/corelib/plugin/qpluginloader/tst_qpluginloader.cpp
+++ b/tests/auto/corelib/plugin/qpluginloader/tst_qpluginloader.cpp
@@ -264,8 +264,8 @@ void tst_QPluginLoader::deleteinstanceOnUnload()
PluginInterface *instance2 = qobject_cast<PluginInterface*>(loader2.instance());
QCOMPARE(instance2->pluginName(), QLatin1String("Plugin ok"));
- QSignalSpy spy1(loader1.instance(), SIGNAL(destroyed()));
- QSignalSpy spy2(loader2.instance(), SIGNAL(destroyed()));
+ QSignalSpy spy1(loader1.instance(), &QObject::destroyed);
+ QSignalSpy spy2(loader2.instance(), &QObject::destroyed);
QVERIFY(spy1.isValid());
QVERIFY(spy2.isValid());
if (pass == 0) {
@@ -423,7 +423,7 @@ void tst_QPluginLoader::reloadPlugin()
QVERIFY(instance);
QCOMPARE(instance->pluginName(), QLatin1String("Plugin ok"));
- QSignalSpy spy(loader.instance(), SIGNAL(destroyed()));
+ QSignalSpy spy(loader.instance(), &QObject::destroyed);
QVERIFY(spy.isValid());
QVERIFY(loader.unload()); // refcount reached 0, did really unload
QCOMPARE(spy.count(), 1);