diff --git a/tests/auto/qdir/CMakeLists.txt b/tests/auto/qdir/CMakeLists.txt index 8ccc3baaa..ddafe4fb9 100644 --- a/tests/auto/qdir/CMakeLists.txt +++ b/tests/auto/qdir/CMakeLists.txt @@ -1,4 +1,3 @@ katie_test(tst_qdir ${CMAKE_CURRENT_SOURCE_DIR}/tst_qdir.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/qdir.qrc ) diff --git a/tests/auto/qdir/qdir.qrc b/tests/auto/qdir/qdir.qrc deleted file mode 100644 index 4c5b5af3b..000000000 --- a/tests/auto/qdir/qdir.qrc +++ /dev/null @@ -1,5 +0,0 @@ - - - resources/entryList/ - - diff --git a/tests/auto/qdir/resources/entryList/file1.data b/tests/auto/qdir/resources/entryList/file1.data deleted file mode 100644 index e69de29bb..000000000 diff --git a/tests/auto/qdir/resources/entryList/file2.data b/tests/auto/qdir/resources/entryList/file2.data deleted file mode 100644 index e69de29bb..000000000 diff --git a/tests/auto/qdir/resources/entryList/file3.data b/tests/auto/qdir/resources/entryList/file3.data deleted file mode 100644 index e69de29bb..000000000 diff --git a/tests/auto/qdir/resources/entryList/file4.nothing b/tests/auto/qdir/resources/entryList/file4.nothing deleted file mode 100644 index e69de29bb..000000000 diff --git a/tests/auto/qdir/tst_qdir.cpp b/tests/auto/qdir/tst_qdir.cpp index eb44d501f..f43ec337a 100644 --- a/tests/auto/qdir/tst_qdir.cpp +++ b/tests/auto/qdir/tst_qdir.cpp @@ -297,11 +297,9 @@ void tst_QDir::exists_data() QTest::newRow("data0") << QDir::currentPath() << true; QTest::newRow("data0.1") << QDir::currentPath() + "/" << true; QTest::newRow("data1") << QString("/I/Do_not_expect_this_path_to_exist/") << false; - QTest::newRow("resource0") << QString(":/tst_qdir/") << true; - QTest::newRow("resource1") << QString(":/I/Do_not_expect_this_resource_to_exist/") << false; - QTest::newRow("simple dir") << SRCDIR "resources" << true; - QTest::newRow("simple dir with slash") << SRCDIR "resources/" << true; + QTest::newRow("simple dir") << SRCDIR "testdir" << true; + QTest::newRow("simple dir with slash") << SRCDIR "testdir/" << true; } void tst_QDir::exists() @@ -321,9 +319,6 @@ void tst_QDir::isRelativePath_data() QTest::newRow("data0") << "../somedir" << true; QTest::newRow("data2") << "somedir" << true; QTest::newRow("data3") << "/somedir" << false; - - QTest::newRow("resource0") << ":/prefix" << false; - QTest::newRow("resource1") << ":/prefix/foo.bar" << false; } void tst_QDir::isRelativePath() @@ -402,13 +397,6 @@ void tst_QDir::entryList_data() // QTest::newRow("unprintablenames") << SRCDIR "unprintablenames" << QStringList("*") // << (int)(QDir::NoFilter) << (int)(QDir::NoSort) // << QString(".,..").split(","); - QTest::newRow("resources1") << QString(":/tst_qdir/resources/entryList") << QStringList("*.data") - << (int)(QDir::NoFilter) << (int)(QDir::NoSort) - << QString("file1.data,file2.data,file3.data").split(','); - QTest::newRow("resources2") << QString(":/tst_qdir/resources/entryList") << QStringList("*.data") - << (int)(QDir::Files) << (int)(QDir::NoSort) - << QString("file1.data,file2.data,file3.data").split(','); - QTest::newRow("nofilter") << SRCDIR "entrylist/" << QStringList("*") << int(QDir::NoFilter) << int(QDir::Name) << filterLinks(QString(".,..,directory,file,linktodirectory.lnk,linktofile.lnk,writable").split(',')); @@ -579,8 +567,8 @@ void tst_QDir::entryListSimple_data() QTest::addColumn("countMin"); QTest::newRow("data2") << "do_not_expect_this_path_to_exist/" << 0; - QTest::newRow("simple dir") << SRCDIR "resources" << 2; - QTest::newRow("simple dir with slash") << SRCDIR "resources/" << 2; + QTest::newRow("simple dir") << SRCDIR "testdir" << 2; + QTest::newRow("simple dir with slash") << SRCDIR "testdir/" << 2; } void tst_QDir::entryListSimple() @@ -659,8 +647,6 @@ void tst_QDir::canonicalPath_data() QTest::newRow("rootPath + ./") << QDir::rootPath().append("./") << QDir::rootPath(); QTest::newRow("rootPath + ../.. ") << QDir::rootPath().append("../..") << QDir::rootPath(); - - QTest::newRow("resource") << ":/tst_qdir/resources/entryList" << ":/tst_qdir/resources/entryList"; } void tst_QDir::canonicalPath() @@ -781,8 +767,6 @@ void tst_QDir::setNameFilters_data() << QString("foo. bar,foo.bar").split(","); QTest::newRow("files1") << appPath + "testdir/dir" << QString("*r.cpp *.pro").split(" ") << QString("qdir.pro,qrc_qdir.cpp,tst_qdir.cpp").split(","); - QTest::newRow("resources1") << QString(":/tst_qdir/resources/entryList") << QStringList("*.data") - << QString("file1.data,file2.data,file3.data").split(','); } void tst_QDir::setNameFilters() @@ -820,14 +804,10 @@ tst_QDir::cleanPath_data() QTest::newRow("data8") << "/foo/bar/..//file1.txt" << "/foo/file1.txt"; QTest::newRow("data9") << "//" << "/"; QTest::newRow("data10") << "/:/" << "/:"; - - QTest::newRow("resource0") << ":/prefix/foo.bar" << ":/prefix/foo.bar"; - QTest::newRow("resource1") << "://prefix/..//prefix/foo.bar" << ":/prefix/foo.bar"; } -void -tst_QDir::cleanPath() +void tst_QDir::cleanPath() { QFETCH(QString, path); QFETCH(QString, expected); @@ -846,7 +826,6 @@ void tst_QDir::absoluteFilePath_data() QTest::newRow("2") << "/" << "passwd" << "/passwd"; QTest::newRow("3") << "relative" << "path" << QDir::currentPath() + "/relative/path"; QTest::newRow("4") << "" << "" << QDir::currentPath(); - QTest::newRow("resource") << ":/prefix" << "foo.bar" << ":/prefix/foo.bar"; } void tst_QDir::absoluteFilePath() @@ -871,7 +850,6 @@ void tst_QDir::absolutePath_data() QTest::newRow("/system/data/../config") << QDir::rootPath() + "system/data/../config" << QDir::rootPath() + "system/config"; QTest::newRow("//home//qt/") << QDir::rootPath() + "/home//qt/" << QDir::rootPath() + "home/qt"; QTest::newRow("foo/../bar") << "foo/../bar" << QDir::currentPath() + "/bar"; - QTest::newRow("resource") << ":/prefix/foo.bar" << ":/prefix/foo.bar"; } void tst_QDir::absolutePath() @@ -904,9 +882,6 @@ void tst_QDir::relativeFilePath_data() QTest::newRow("10") << "/" << "/ding/../../../../dong" << "../../../dong"; QTest::newRow("11") << "" << "" << ""; - - QTest::newRow("resource0") << ":/prefix" << "foo.bar" << "foo.bar"; - QTest::newRow("resource1") << ":/prefix" << ":/prefix/foo.bar" << "foo.bar"; } void tst_QDir::relativeFilePath() @@ -929,7 +904,6 @@ void tst_QDir::filePath_data() QTest::newRow("2") << "/" << "passwd" << "/passwd"; QTest::newRow("3") << "relative" << "path" << "relative/path"; QTest::newRow("4") << "" << "" << "."; - QTest::newRow("resource") << ":/prefix" << "foo.bar" << ":/prefix/foo.bar"; } void tst_QDir::filePath() @@ -989,8 +963,6 @@ void tst_QDir::exists2_data() QTest::newRow("4") << "/testData" << false; QTest::newRow("5") << "tst_qdir.cpp" << true; QTest::newRow("6") << "/resources.cpp" << false; - QTest::newRow("resource0") << ":/prefix/foo.bar" << false; - QTest::newRow("resource1") << ":/tst_qdir/resources/entryList/file1.data" << true; } void tst_QDir::exists2() @@ -1022,8 +994,6 @@ void tst_QDir::dirName_data() QTest::newRow("slash0") << "c:/winnt/system32" << "system32"; QTest::newRow("slash1") << "/winnt/system32" << "system32"; QTest::newRow("slash2") << "c:/winnt/system32/kernel32.dll" << "kernel32.dll"; - - QTest::newRow("resource") << ":/prefix" << "prefix"; } void tst_QDir::dirName() @@ -1351,9 +1321,6 @@ void tst_QDir::isRoot_data() test = QDir(QDir::rootPath().append("./")).canonicalPath(); QTest::newRow(QString("canonicalPath " + test).toLatin1()) << test << true; - - QTest::newRow("resources root") << ":/" << true; - QTest::newRow("resources nonroot") << ":/entrylist" << false; } void tst_QDir::isRoot() @@ -1492,8 +1459,6 @@ void tst_QDir::isRelative_data() QTest::newRow("homepath") << QDir::homePath() << false; QTest::newRow("temppath") << QDir::tempPath() << false; QTest::newRow("rootpath") << QDir::rootPath() << false; - - QTest::newRow("resource") << ":/prefix" << false; } void tst_QDir::isRelative() @@ -1522,4 +1487,3 @@ void tst_QDir::isReadable() QTEST_MAIN(tst_QDir) #include "moc_tst_qdir.cpp" -#include "qrc_qdir.cpp" diff --git a/tests/auto/qdiriterator/CMakeLists.txt b/tests/auto/qdiriterator/CMakeLists.txt index 153118f66..2cf849795 100644 --- a/tests/auto/qdiriterator/CMakeLists.txt +++ b/tests/auto/qdiriterator/CMakeLists.txt @@ -1,4 +1,3 @@ katie_test(tst_qdiriterator ${CMAKE_CURRENT_SOURCE_DIR}/tst_qdiriterator.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/qdiriterator.qrc ) diff --git a/tests/auto/qdiriterator/qdiriterator.qrc b/tests/auto/qdiriterator/qdiriterator.qrc deleted file mode 100644 index 058d47478..000000000 --- a/tests/auto/qdiriterator/qdiriterator.qrc +++ /dev/null @@ -1,6 +0,0 @@ - - - entrylist/file - entrylist/directory/dummy - - diff --git a/tests/auto/qdiriterator/tst_qdiriterator.cpp b/tests/auto/qdiriterator/tst_qdiriterator.cpp index fdc3d6ea5..c0c7ca3e8 100644 --- a/tests/auto/qdiriterator/tst_qdiriterator.cpp +++ b/tests/auto/qdiriterator/tst_qdiriterator.cpp @@ -84,8 +84,6 @@ private: // convenience functions private slots: void iterateRelativeDirectory_data(); void iterateRelativeDirectory(); - void iterateResource_data(); - void iterateResource(); void stopLinkLoop(); void absoluteFilePathsFromRelativeIteratorPath(); void recurseWithFilters() const; @@ -320,53 +318,6 @@ void tst_QDirIterator::iterateRelativeDirectory() QCOMPARE(list, sortedEntries); } -void tst_QDirIterator::iterateResource_data() -{ - QTest::addColumn("dirName"); // relative from current path or abs - QTest::addColumn("flags"); - QTest::addColumn("filters"); - QTest::addColumn("nameFilters"); - QTest::addColumn("entries"); - - QTest::newRow("invalid") << QString::fromLatin1(":/burpaburpa") << QDirIterator::IteratorFlags(0) - << QDir::Filters(QDir::NoFilter) << QStringList(QLatin1String("*")) - << QStringList(); - QTest::newRow(":/") << QString::fromLatin1(":/") << QDirIterator::IteratorFlags(0) - << QDir::Filters(QDir::NoFilter) << QStringList(QLatin1String("*")) - << QString::fromLatin1(":/entrylist").split(QLatin1String(",")); - QTest::newRow(":/entrylist") << QString::fromLatin1(":/entrylist") << QDirIterator::IteratorFlags(0) - << QDir::Filters(QDir::NoFilter) << QStringList(QLatin1String("*")) - << QString::fromLatin1(":/entrylist/directory,:/entrylist/file").split(QLatin1String(",")); - QTest::newRow(":/ recursive") << QString::fromLatin1(":/") << QDirIterator::IteratorFlags(QDirIterator::Subdirectories) - << QDir::Filters(QDir::NoFilter) << QStringList(QLatin1String("*")) - << QString::fromLatin1(":/entrylist,:/entrylist/directory,:/entrylist/directory/dummy,:/entrylist/file").split(QLatin1String(",")); -} - -void tst_QDirIterator::iterateResource() -{ - QFETCH(QString, dirName); - QFETCH(QDirIterator::IteratorFlags, flags); - QFETCH(QDir::Filters, filters); - QFETCH(QStringList, nameFilters); - QFETCH(QStringList, entries); - - QDirIterator it(dirName, nameFilters, filters, flags); - QStringList list; - while (it.hasNext()) - list << it.next(); - - list.sort(); - QStringList sortedEntries = entries; - sortedEntries.sort(); - - if (sortedEntries != list) { - qDebug() << "EXPECTED:" << sortedEntries; - qDebug() << "ACTUAL:" << list; - } - - QCOMPARE(list, sortedEntries); -} - void tst_QDirIterator::stopLinkLoop() { createLink(QDir::currentPath() + QLatin1String("/entrylist"), "entrylist/entrylist1.lnk"); @@ -515,4 +466,3 @@ void tst_QDirIterator::qtbug15421_hiddenDirs_hiddenFiles() QTEST_MAIN(tst_QDirIterator) #include "moc_tst_qdiriterator.cpp" -#include "qrc_qdiriterator.cpp" diff --git a/tests/auto/qfile/CMakeLists.txt b/tests/auto/qfile/CMakeLists.txt index 52c2815fe..066846250 100644 --- a/tests/auto/qfile/CMakeLists.txt +++ b/tests/auto/qfile/CMakeLists.txt @@ -1,7 +1,5 @@ katie_test(tst_qfile ${CMAKE_CURRENT_SOURCE_DIR}/tst_qfile.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/copy-rename.qrc - ${CMAKE_CURRENT_SOURCE_DIR}/qfile.qrc ) set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}) diff --git a/tests/auto/qfile/copy-rename.qrc b/tests/auto/qfile/copy-rename.qrc deleted file mode 100644 index 441f28e7b..000000000 --- a/tests/auto/qfile/copy-rename.qrc +++ /dev/null @@ -1,5 +0,0 @@ - - - copy-rename.qrc - - diff --git a/tests/auto/qfile/qfile.qrc b/tests/auto/qfile/qfile.qrc deleted file mode 100644 index 2c63d8afe..000000000 --- a/tests/auto/qfile/qfile.qrc +++ /dev/null @@ -1,5 +0,0 @@ - - - resources/ - - diff --git a/tests/auto/qfile/resources/file1.ext1 b/tests/auto/qfile/resources/file1.ext1 deleted file mode 100644 index e56e15bb7..000000000 --- a/tests/auto/qfile/resources/file1.ext1 +++ /dev/null @@ -1 +0,0 @@ -12345 diff --git a/tests/auto/qfile/tst_qfile.cpp b/tests/auto/qfile/tst_qfile.cpp index fe1a9663a..929b6d30f 100644 --- a/tests/auto/qfile/tst_qfile.cpp +++ b/tests/auto/qfile/tst_qfile.cpp @@ -135,7 +135,6 @@ private slots: void rename_data(); void rename(); void renameWithAtEndSpecialFile() const; - void resourceCopyRename(); void renameMultiple(); void appendAndRead(); void standarderror(); @@ -147,8 +146,6 @@ private slots: void map_data(); void map(); - void mapResource_data(); - void mapResource(); void mapOpenMode_data(); void mapOpenMode(); @@ -276,8 +273,6 @@ tst_QFile::tst_QFile() : m_srcDir(QLatin1String(SRCDIR)) , m_stdinProcess(findStdinProcess()) { - Q_INIT_RESOURCE(copy_rename); - Q_INIT_RESOURCE(qfile); } tst_QFile::~tst_QFile() @@ -298,10 +293,6 @@ void tst_QFile::cleanup() // TODO: Add cleanup code here. // This will be executed immediately after each test is run. - // for resourceCopyRename() - QFile::remove("file-copy-destination.txt"); - QFile::remove("file-rename-destination.txt"); - // for copyAfterFail() QFile::remove("file-to-be-copied.txt"); QFile::remove("existing-file.txt"); @@ -366,7 +357,6 @@ void tst_QFile::cleanupTestCase() QFile::remove("tst_qfile_copy.cpp"); QFile::remove("nullinline.txt"); QFile::remove("myLink2.lnk"); - QFile::remove("resources"); QFile::remove("qfile_map_testfile"); QFile::remove("readAllBuffer.txt"); QFile::remove("qt_file.tmp"); @@ -1088,9 +1078,6 @@ void tst_QFile::permissions_data() QTest::newRow("data0") << QCoreApplication::instance()->applicationFilePath() << uint(QFile::ExeUser) << true; QTest::newRow("data1") << SRCDIR "tst_qfile.cpp" << uint(QFile::ReadUser) << true; // QTest::newRow("data2") << "tst_qfile.cpp" << int(QFile::WriteUser) << false; - QTest::newRow("resource1") << ":/tst_qfileinfo/resources/file1.ext1" << uint(QFile::ReadUser) << true; - QTest::newRow("resource2") << ":/tst_qfileinfo/resources/file1.ext1" << uint(QFile::WriteUser) << false; - QTest::newRow("resource3") << ":/tst_qfileinfo/resources/file1.ext1" << uint(QFile::ExeUser) << false; } void tst_QFile::permissions() @@ -2141,22 +2128,6 @@ void tst_QFile::renameWithAtEndSpecialFile() const QVERIFY(QFile::rename(newName, originalName)); } -void tst_QFile::resourceCopyRename() -{ - // Using a resource file as a *read-only* source whose move and copy should fail. - QFile file(":/copy-rename.qrc"); - QVERIFY(file.exists()); - QFile::remove("file-rename-destination.txt"); - - QVERIFY(!file.copy("file-copy-destination.txt")); - QVERIFY(!QFile::exists("file-copy-destination.txt")); - QVERIFY(!file.isOpen()); - - QVERIFY(!file.rename("file-rename-destination.txt")); - QVERIFY(!QFile::exists("file-rename-destination.txt")); - QVERIFY(!file.isOpen()); -} - void tst_QFile::renameMultiple() { // create the file if it doesn't exist @@ -2550,43 +2521,6 @@ void tst_QFile::map() QVERIFY(file.remove()); } -void tst_QFile::mapResource_data() -{ - QTest::addColumn("offset"); - QTest::addColumn("size"); - QTest::addColumn("error"); - QTest::addColumn("fileName"); - - QString validFile = ":/tst_qfileinfo/resources/file1.ext1"; - QString invalidFile = ":/tst_qfileinfo/resources/filefoo.ext1"; - - for (int i = 0; i < 2; ++i) { - QString file = (i == 0) ? validFile : invalidFile; - QTest::newRow("0, 0") << 0 << 0 << QFile::UnspecifiedError << file; - QTest::newRow("0, BIG") << 0 << 4096 << QFile::UnspecifiedError << file; - QTest::newRow("-1, 0") << -1 << 0 << QFile::UnspecifiedError << file; - QTest::newRow("0, -1") << 0 << -1 << QFile::UnspecifiedError << file; - } - - QTest::newRow("0, 1") << 0 << 1 << QFile::NoError << validFile; -} - -void tst_QFile::mapResource() -{ - QFETCH(QString, fileName); - QFETCH(int, offset); - QFETCH(int, size); - QFETCH(QFile::FileError, error); - - QFile file(fileName); - uchar *memory = file.map(offset, size); - QCOMPARE(file.error(), error); - QVERIFY((error == QFile::NoError) ? (memory != 0) : (memory == 0)); - if (error == QFile::NoError) - QCOMPARE(QString(memory[0]), QString::number(offset + 1)); - QVERIFY(file.unmap(memory)); -} - void tst_QFile::mapOpenMode_data() { QTest::addColumn("openMode"); @@ -2643,7 +2577,7 @@ void tst_QFile::mapOpenMode() void tst_QFile::openDirectory() { - QFile f1(SRCDIR "resources"); + QFile f1(SRCDIR); // it's a directory, it must not exist QVERIFY(!f1.exists()); @@ -2891,6 +2825,4 @@ void tst_QFile::hijack() QTEST_MAIN(tst_QFile) -#include "qrc_copy-rename.cpp" -#include "qrc_qfile.cpp" #include "moc_tst_qfile.cpp" diff --git a/tests/auto/qfileinfo/CMakeLists.txt b/tests/auto/qfileinfo/CMakeLists.txt index 48595cda1..65e4f282f 100644 --- a/tests/auto/qfileinfo/CMakeLists.txt +++ b/tests/auto/qfileinfo/CMakeLists.txt @@ -1,4 +1,3 @@ katie_test(tst_qfileinfo ${CMAKE_CURRENT_SOURCE_DIR}/tst_qfileinfo.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/qfileinfo.qrc ) diff --git a/tests/auto/qfileinfo/qfileinfo.qrc b/tests/auto/qfileinfo/qfileinfo.qrc deleted file mode 100644 index 2c63d8afe..000000000 --- a/tests/auto/qfileinfo/qfileinfo.qrc +++ /dev/null @@ -1,5 +0,0 @@ - - - resources/ - - diff --git a/tests/auto/qfileinfo/tst_qfileinfo.cpp b/tests/auto/qfileinfo/tst_qfileinfo.cpp index 1e652dd10..88241dae6 100644 --- a/tests/auto/qfileinfo/tst_qfileinfo.cpp +++ b/tests/auto/qfileinfo/tst_qfileinfo.cpp @@ -217,9 +217,6 @@ void tst_QFileInfo::isFile_data() QTest::newRow("data0") << QDir::currentPath() << false; QTest::newRow("data1") << SRCDIR "tst_qfileinfo.cpp" << true; - QTest::newRow("data2") << ":/tst_qfileinfo/resources/" << false; - QTest::newRow("data3") << ":/tst_qfileinfo/resources/file1" << true; - QTest::newRow("data4") << ":/tst_qfileinfo/resources/afilethatshouldnotexist" << false; } void tst_QFileInfo::isFile() @@ -250,9 +247,6 @@ void tst_QFileInfo::isDir_data() QTest::newRow("data0") << QDir::currentPath() << true; QTest::newRow("data1") << SRCDIR "tst_qfileinfo.cpp" << false; - QTest::newRow("data2") << ":/tst_qfileinfo/resources/" << true; - QTest::newRow("data3") << ":/tst_qfileinfo/resources/file1" << false; - QTest::newRow("data4") << ":/tst_qfileinfo/resources/afilethatshouldnotexist" << false; QTest::newRow("simple dir") << SRCDIR "resources" << true; QTest::newRow("simple dir with slash") << SRCDIR "resources/" << true; @@ -277,8 +271,6 @@ void tst_QFileInfo::isRoot_data() QTest::newRow("data1") << "/" << true; QTest::newRow("data2") << "*" << false; QTest::newRow("data3") << "/*" << false; - QTest::newRow("data4") << ":/tst_qfileinfo/resources/" << false; - QTest::newRow("data5") << ":/" << true; QTest::newRow("simple dir") << SRCDIR "resources" << false; QTest::newRow("simple dir with slash") << SRCDIR "resources/" << false; @@ -301,9 +293,6 @@ void tst_QFileInfo::exists_data() QTest::newRow("data0") << QDir::currentPath() << true; QTest::newRow("data1") << SRCDIR "tst_qfileinfo.cpp" << true; QTest::newRow("data2") << "/I/do_not_expect_this_path_to_exist/" << false; - QTest::newRow("data3") << ":/tst_qfileinfo/resources/" << true; - QTest::newRow("data4") << ":/tst_qfileinfo/resources/file1" << true; - QTest::newRow("data5") << ":/I/do_not_expect_this_path_to_exist/" << false; QTest::newRow("data6") << SRCDIR "resources/*" << false; QTest::newRow("data7") << SRCDIR "resources/*.foo" << false; QTest::newRow("data8") << SRCDIR "resources/*.ext1" << false; @@ -464,8 +453,6 @@ void tst_QFileInfo::fileName_data() QTest::newRow("relativeFile") << "tmp.txt" << "tmp.txt"; QTest::newRow("relativeFileInSubDir") << "temp/tmp.txt" << "tmp.txt"; QTest::newRow("absFilePath") << "/home/andy/tmp.txt" << "tmp.txt"; - QTest::newRow("resource1") << ":/tst_qfileinfo/resources/file1.ext1" << "file1.ext1"; - QTest::newRow("resource2") << ":/tst_qfileinfo/resources/file1.ext1.ext2" << "file1.ext1.ext2"; QTest::newRow("ending slash [small]") << QString::fromLatin1("/a/") << QString::fromLatin1(""); QTest::newRow("no ending slash [small]") << QString::fromLatin1("/a") << QString::fromLatin1("a"); @@ -495,7 +482,6 @@ void tst_QFileInfo::dir_data() QTest::newRow("relativeFileInSubDirAbsPath") << "temp/tmp.txt" << true << QDir::currentPath() + "/temp"; QTest::newRow("absFilePath") << QDir::currentPath() + "/tmp.txt" << false << QDir::currentPath(); QTest::newRow("absFilePathAbsPath") << QDir::currentPath() + "/tmp.txt" << true << QDir::currentPath(); - QTest::newRow("resource1") << ":/tst_qfileinfo/resources/file1.ext1" << true << ":/tst_qfileinfo/resources"; } void tst_QFileInfo::dir() @@ -526,8 +512,6 @@ void tst_QFileInfo::suffix_data() QTest::newRow("data1") << "file.tar.gz" << "gz"; QTest::newRow("data2") << "/path/file/file.tar.gz" << "gz"; QTest::newRow("data3") << "/path/file.tar" << "tar"; - QTest::newRow("resource1") << ":/tst_qfileinfo/resources/file1.ext1" << "ext1"; - QTest::newRow("resource2") << ":/tst_qfileinfo/resources/file1.ext1.ext2" << "ext2"; QTest::newRow("hidden1") << ".ext1" << "ext1"; QTest::newRow("hidden1") << ".ext" << "ext"; QTest::newRow("hidden1") << ".ex" << "ex"; @@ -560,8 +544,6 @@ void tst_QFileInfo::completeSuffix_data() QTest::newRow("data1") << "file.tar.gz" << "tar.gz"; QTest::newRow("data2") << "/path/file/file.tar.gz" << "tar.gz"; QTest::newRow("data3") << "/path/file.tar" << "tar"; - QTest::newRow("resource1") << ":/tst_qfileinfo/resources/file1.ext1" << "ext1"; - QTest::newRow("resource2") << ":/tst_qfileinfo/resources/file1.ext1.ext2" << "ext1.ext2"; } void tst_QFileInfo::completeSuffix() @@ -583,8 +565,6 @@ void tst_QFileInfo::baseName_data() QTest::newRow("data2") << "/path/file/file.tar.gz" << "file"; QTest::newRow("data3") << "/path/file.tar" << "file"; QTest::newRow("data4") << "/path/file" << "file"; - QTest::newRow("resource1") << ":/tst_qfileinfo/resources/file1.ext1" << "file1"; - QTest::newRow("resource2") << ":/tst_qfileinfo/resources/file1.ext1.ext2" << "file1"; } void tst_QFileInfo::baseName() @@ -606,8 +586,6 @@ void tst_QFileInfo::completeBaseName_data() QTest::newRow("data2") << "/path/file/file.tar.gz" << "file.tar"; QTest::newRow("data3") << "/path/file.tar" << "file"; QTest::newRow("data4") << "/path/file" << "file"; - QTest::newRow("resource1") << ":/tst_qfileinfo/resources/file1.ext1" << "file1"; - QTest::newRow("resource2") << ":/tst_qfileinfo/resources/file1.ext1.ext2" << "file1.ext1"; } void tst_QFileInfo::completeBaseName() @@ -628,9 +606,6 @@ void tst_QFileInfo::permission_data() QTest::newRow("data0") << QCoreApplication::instance()->applicationFilePath() << int(QFile::ExeUser) << true; QTest::newRow("data1") << SRCDIR "tst_qfileinfo.cpp" << int(QFile::ReadUser) << true; // QTest::newRow("data2") << "tst_qfileinfo.cpp" << int(QFile::WriteUser) << false; - QTest::newRow("resource1") << ":/tst_qfileinfo/resources/file1.ext1" << int(QFile::ReadUser) << true; - QTest::newRow("resource2") << ":/tst_qfileinfo/resources/file1.ext1" << int(QFile::WriteUser) << false; - QTest::newRow("resource3") << ":/tst_qfileinfo/resources/file1.ext1" << int(QFile::ExeUser) << false; } void tst_QFileInfo::permission() @@ -647,14 +622,11 @@ void tst_QFileInfo::size_data() QTest::addColumn("file"); QTest::addColumn("size"); - QTest::newRow("resource1") << ":/tst_qfileinfo/resources/file1.ext1" << 0; QFile::remove("file1"); QFile file("file1"); QVERIFY(file.open(QFile::WriteOnly)); QCOMPARE(file.write("JAJAJAA"), qint64(7)); QTest::newRow("created-file") << "file1" << 7; - - QTest::newRow("resource2") << ":/tst_qfileinfo/resources/file1.ext1.ext2" << 0; } void tst_QFileInfo::size() @@ -848,8 +820,6 @@ void tst_QFileInfo::isLocalFs_data() QTest::newRow("local root") << QString::fromLatin1("/") << true; QTest::newRow("local non-existent file") << QString::fromLatin1("/abrakadabra.boo") << true; - - QTest::newRow("qresource root") << QString::fromLatin1(":/") << false; } void tst_QFileInfo::isLocalFs() @@ -1114,5 +1084,4 @@ void tst_QFileInfo::invalidState() QTEST_MAIN(tst_QFileInfo) -#include "moc_tst_qfileinfo.cpp" -#include "qrc_qfileinfo.cpp" \ No newline at end of file +#include "moc_tst_qfileinfo.cpp" \ No newline at end of file diff --git a/tests/auto/qtextdocument/tst_qtextdocument.cpp b/tests/auto/qtextdocument/tst_qtextdocument.cpp index ab9123ab6..a6ff4c440 100644 --- a/tests/auto/qtextdocument/tst_qtextdocument.cpp +++ b/tests/auto/qtextdocument/tst_qtextdocument.cpp @@ -1911,7 +1911,7 @@ void tst_QTextDocument::clonePreservesDefaultFont() void tst_QTextDocument::clonePreservesResources() { - QUrl testUrl(":/foobar"); + QUrl testUrl("/foobar"); QVariant testResource("hello world"); doc->addResource(QTextDocument::ImageResource, testUrl, testResource);