summaryrefslogtreecommitdiffstats
path: root/tests/auto/corelib/plugin/qlibrary
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2014-07-21 17:45:55 -0700
committerThiago Macieira <thiago.macieira@intel.com>2014-07-23 17:50:31 +0200
commitf07c27eec117c664e3c0101c3077524647a32662 (patch)
tree3a7cd02bdcce1a24d001731fffc35cfa5de0b115 /tests/auto/corelib/plugin/qlibrary
parentcfaf851e268dac95cb140fbffc1233981ce48d4c (diff)
Don't store QLibraryPrivate with empty file names in the global store
They shouldn't exist in the first place. They exist in two cases only: 1) mistake by the user in the QLibrary or QPluginLoader constructors or setFileName 2) as a kludge for setLoadHints before a file name is set (we need to store the user's requested hints somewhere) This is important for the second case, as otherwise all QLibrary and QPluginLoader objects without a file name would share the setting. Task-number: QTBUG-39642 Change-Id: Iebff0252fd4d95a1d54caf338d4e2fff4de3b189 Reviewed-by: David Faure <david.faure@kdab.com>
Diffstat (limited to 'tests/auto/corelib/plugin/qlibrary')
-rw-r--r--tests/auto/corelib/plugin/qlibrary/tst_qlibrary.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/auto/corelib/plugin/qlibrary/tst_qlibrary.cpp b/tests/auto/corelib/plugin/qlibrary/tst_qlibrary.cpp
index fc7e99103c..2244f3e041 100644
--- a/tests/auto/corelib/plugin/qlibrary/tst_qlibrary.cpp
+++ b/tests/auto/corelib/plugin/qlibrary/tst_qlibrary.cpp
@@ -456,6 +456,9 @@ 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);