summaryrefslogtreecommitdiffstats
path: root/tests/auto/corelib/plugin/qlibrary/tst_qlibrary.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/corelib/plugin/qlibrary/tst_qlibrary.cpp')
-rw-r--r--tests/auto/corelib/plugin/qlibrary/tst_qlibrary.cpp11
1 files changed, 11 insertions, 0 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());