Revert 3a0f5d04fce00812cddd44e54ef25f7ab7d9240d
authorToby Tomkins <toby.tomkins@nokia.com>
Tue, 22 Nov 2011 06:15:55 +0000 (16:15 +1000)
committerQt by Nokia <qt-info@nokia.com>
Tue, 22 Nov 2011 07:57:08 +0000 (08:57 +0100)
The removal of plugin cache in qt5 (8ed47d961dc7e6f161030654d11cd330a542eadf)
means that only the original loading error (from QElfParser) is reported.
In Qt4 this was previously two different strings depending on if the library
had been previously cached.

Task-number: QTBUG-22834

Change-Id: I15a4adc7d0f8f23f16bb2aa8ba8b968db770f074
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
tests/auto/corelib/plugin/qpluginloader/tst_qpluginloader.cpp

index 7cdd816..a874324 100644 (file)
@@ -263,15 +263,15 @@ void tst_QPluginLoader::loadCorruptElf()
 
         QPluginLoader lib1(SRCDIR "elftest/corrupt1.elf64.so");
         QCOMPARE(lib1.load(), false);
-        QVERIFY2(lib1.errorString().contains("not a valid Qt plugin"), qPrintable(lib1.errorString()));
+        QVERIFY2(lib1.errorString().contains("not an ELF object"), qPrintable(lib1.errorString()));
 
         QPluginLoader lib2(SRCDIR "elftest/corrupt2.elf64.so");
         QCOMPARE(lib2.load(), false);
-        QVERIFY2(lib2.errorString().contains("not a valid Qt plugin"), qPrintable(lib2.errorString()));
+        QVERIFY2(lib2.errorString().contains("invalid"), qPrintable(lib2.errorString()));
 
         QPluginLoader lib3(SRCDIR "elftest/corrupt3.elf64.so");
         QCOMPARE(lib3.load(), false);
-        QVERIFY2(lib3.errorString().contains("not a valid Qt plugin"), qPrintable(lib3.errorString()));
+        QVERIFY2(lib3.errorString().contains("invalid"), qPrintable(lib3.errorString()));
     } else if (sizeof(void*) == 4) {
         QPluginLoader libW(SRCDIR "elftest/corrupt3.elf64.so");
         QCOMPARE(libW.load(), false);