diff options
author | Jason McDonald <jason.mcdonald@nokia.com> | 2011-09-27 19:53:01 +1000 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2011-09-29 06:41:42 +0200 |
commit | 95cebd34ebc5b4d39b11dc91610309a35e488663 (patch) | |
tree | 90ceffef5acea093dd2b8f8f7e8c30593023b85a /tests/auto/corelib/io | |
parent | ab061e3e436fab35eac8666f3e950e98f66c4d3e (diff) |
Remove Symbian-specific code from tests.
Symbian is not a supported platform for Qt5, so this code is no longer
required.
Change-Id: I1172e6a42d518490e63e9599bf10579df08259aa
Reviewed-on: http://codereview.qt-project.org/5657
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Diffstat (limited to 'tests/auto/corelib/io')
29 files changed, 139 insertions, 829 deletions
diff --git a/tests/auto/corelib/io/qdatastream/qdatastream.pro b/tests/auto/corelib/io/qdatastream/qdatastream.pro index 51c342c350..5d80b4f65c 100644 --- a/tests/auto/corelib/io/qdatastream/qdatastream.pro +++ b/tests/auto/corelib/io/qdatastream/qdatastream.pro @@ -6,15 +6,7 @@ wince*: { addFiles.path = . DEPLOYMENT += addFiles DEFINES += SRCDIR=\\\"\\\" -} else:symbian { - # SRCDIR defined in code in symbian - addFiles.files = datastream.q42 - addFiles.path = . - DEPLOYMENT += addFiles - TARGET.EPOCHEAPSIZE = 1000000 10000000 - TARGET.UID3 = 0xE0340001 - DEFINES += SYMBIAN_SRCDIR_UID=$$lower($$replace(TARGET.UID3,"0x","")) -}else { +} else { DEFINES += SRCDIR=\\\"$$PWD/\\\" } diff --git a/tests/auto/corelib/io/qdatastream/tst_qdatastream.cpp b/tests/auto/corelib/io/qdatastream/tst_qdatastream.cpp index d34887f6e6..cd4f6c7204 100644 --- a/tests/auto/corelib/io/qdatastream/tst_qdatastream.cpp +++ b/tests/auto/corelib/io/qdatastream/tst_qdatastream.cpp @@ -43,12 +43,6 @@ #include <QtTest/QtTest> #include <QtGui/QtGui> -#if defined(Q_OS_SYMBIAN) -# define STRINGIFY(x) #x -# define TOSTRING(x) STRINGIFY(x) -# define SRCDIR "C:/Private/" TOSTRING(SYMBIAN_SRCDIR_UID) "/" -#endif - Q_DECLARE_METATYPE(QBitArray) Q_DECLARE_METATYPE(qint64) @@ -1906,7 +1900,7 @@ static QRegion qRegionData(int index) case 4: return QRegion(100, -100, 2048, 4096, QRegion::Rectangle); case 5: return QRegion(-100, 100, 4096, 2048, QRegion::Rectangle); case 6: return QRegion(0, 0, 0, 0, QRegion::Ellipse); -#if defined(Q_OS_SYMBIAN) || (!defined(Q_OS_UNIX) && !defined(Q_OS_WINCE)) // all our Unix platforms use X regions. +#if (!defined(Q_OS_UNIX) && !defined(Q_OS_WINCE)) // all our Unix platforms use X regions. case 7: return QRegion(1, 2, 300, 400, QRegion::Ellipse); case 8: return QRegion(100, 100, 1024, 768, QRegion::Ellipse); case 9: return QRegion(-100, -100, 1024, 1024, QRegion::Ellipse); @@ -2558,7 +2552,7 @@ void tst_QDataStream::status_charptr_QByteArray_data() QTest::addColumn<int>("expectedStatus"); QTest::addColumn<QByteArray>("expectedString"); -#if !defined(Q_OS_WINCE) && !defined(Q_OS_SYMBIAN) +#if !defined(Q_OS_WINCE) QByteArray oneMbMinus1(1024 * 1024 - 1, '\0'); for (int i = 0; i < oneMbMinus1.size(); ++i) oneMbMinus1[i] = 0x1 | (8 * ((uchar)i / 9)); @@ -2572,7 +2566,7 @@ void tst_QDataStream::status_charptr_QByteArray_data() QTest::newRow("size 3") << QByteArray("\x00\x00\x00\x03jkl", 7) << (int) QDataStream::Ok << QByteArray("jkl"); QTest::newRow("size 4") << QByteArray("\x00\x00\x00\x04jklm", 8) << (int) QDataStream::Ok << QByteArray("jklm"); QTest::newRow("size 4j") << QByteArray("\x00\x00\x00\x04jklmj", 8) << (int) QDataStream::Ok << QByteArray("jklm"); -#if !defined(Q_OS_WINCE) && !defined(Q_OS_SYMBIAN) +#if !defined(Q_OS_WINCE) QTest::newRow("size 1MB-1") << QByteArray("\x00\x0f\xff\xff", 4) + oneMbMinus1 + QByteArray("j") << (int) QDataStream::Ok << oneMbMinus1; QTest::newRow("size 1MB") << QByteArray("\x00\x10\x00\x00", 4) + oneMbMinus1 + QByteArray("jkl") << (int) QDataStream::Ok << oneMbMinus1 + "j"; QTest::newRow("size 1MB+1") << QByteArray("\x00\x10\x00\x01", 4) + oneMbMinus1 + QByteArray("jkl") << (int) QDataStream::Ok << oneMbMinus1 + "jk"; @@ -2592,7 +2586,7 @@ void tst_QDataStream::status_charptr_QByteArray_data() QTest::newRow("badsize 2") << QByteArray("\x00\x00\x00\x02j", 5) << (int) QDataStream::ReadPastEnd << QByteArray(); QTest::newRow("badsize 3") << QByteArray("\x00\x00\x00\x03jk", 6) << (int) QDataStream::ReadPastEnd << QByteArray(); QTest::newRow("badsize 4") << QByteArray("\x00\x00\x00\x04jkl", 7) << (int) QDataStream::ReadPastEnd << QByteArray(); -#if !defined(Q_OS_WINCE) && !defined(Q_OS_SYMBIAN) +#if !defined(Q_OS_WINCE) QTest::newRow("badsize 1MB") << QByteArray("\x00\x10\x00\x00", 4) + oneMbMinus1 << (int) QDataStream::ReadPastEnd << QByteArray(); QTest::newRow("badsize 1MB+1") << QByteArray("\x00\x10\x00\x01", 4) + oneMbMinus1 + QByteArray("j") << (int) QDataStream::ReadPastEnd << QByteArray(); QTest::newRow("badsize 3MB") << QByteArray("\x00\x30\x00\x00", 4) + threeMbMinus1 << (int) QDataStream::ReadPastEnd << QByteArray(); @@ -2662,7 +2656,7 @@ void tst_QDataStream::status_QString_data() QTest::addColumn<int>("expectedStatus"); QTest::addColumn<QString>("expectedString"); -#if !defined(Q_OS_WINCE) && !defined(Q_OS_SYMBIAN) +#if !defined(Q_OS_WINCE) QString oneMbMinus1; oneMbMinus1.resize(1024 * 1024 - 1); for (int i = 0; i < oneMbMinus1.size(); ++i) @@ -2680,7 +2674,7 @@ void tst_QDataStream::status_QString_data() QTest::newRow("size 3") << QByteArray("\x00\x00\x00\x06\x00j\x00k\x00l", 10) << (int) QDataStream::Ok << QString("jkl"); QTest::newRow("size 4") << QByteArray("\x00\x00\x00\x08\x00j\x00k\x00l\x00m", 12) << (int) QDataStream::Ok << QString("jklm"); QTest::newRow("size 4j") << QByteArray("\x00\x00\x00\x08\x00j\x00k\x00l\x00mjj", 14) << (int) QDataStream::Ok << QString("jklm"); -#if !defined(Q_OS_WINCE) && !defined(Q_OS_SYMBIAN) +#if !defined(Q_OS_WINCE) QTest::newRow("size 1MB-1") << QByteArray("\x00\x1f\xff\xfe", 4) + oneMbMinus1Data + QByteArray("jj") << (int) QDataStream::Ok << oneMbMinus1; QTest::newRow("size 1MB") << QByteArray("\x00\x20\x00\x00", 4) + oneMbMinus1Data + QByteArray("\x00j\x00k\x00l", 6) << (int) QDataStream::Ok << oneMbMinus1 + "j"; QTest::newRow("size 1MB+1") << QByteArray("\x00\x20\x00\x02", 4) + oneMbMinus1Data + QByteArray("\x00j\x00k\x00l", 6) << (int) QDataStream::Ok << oneMbMinus1 + "jk"; @@ -2700,7 +2694,7 @@ void tst_QDataStream::status_QString_data() QTest::newRow("badsize 2") << QByteArray("\x00\x00\x00\x04jj", 6) << (int) QDataStream::ReadPastEnd << QString(); QTest::newRow("badsize 3") << QByteArray("\x00\x00\x00\x06jjkk", 8) << (int) QDataStream::ReadPastEnd << QString(); QTest::newRow("badsize 4") << QByteArray("\x00\x00\x00\x08jjkkll", 10) << (int) QDataStream::ReadPastEnd << QString(); -#if !defined(Q_OS_WINCE) && !defined(Q_OS_SYMBIAN) +#if !defined(Q_OS_WINCE) QTest::newRow("badsize 1MB") << QByteArray("\x00\x20\x00\x00", 4) + oneMbMinus1Data << (int) QDataStream::ReadPastEnd << QString(); QTest::newRow("badsize 1MB+1") << QByteArray("\x00\x20\x00\x02", 4) + oneMbMinus1Data + QByteArray("j") << (int) QDataStream::ReadPastEnd << QString(); QTest::newRow("badsize 3MB") << QByteArray("\x00\x60\x00\x00", 4) + threeMbMinus1Data << (int) QDataStream::ReadPastEnd << QString(); diff --git a/tests/auto/corelib/io/qdir/qdir.pro b/tests/auto/corelib/io/qdir/qdir.pro index fc266a2a97..3f63978970 100644 --- a/tests/auto/corelib/io/qdir/qdir.pro +++ b/tests/auto/corelib/io/qdir/qdir.pro @@ -3,7 +3,7 @@ SOURCES += tst_qdir.cpp RESOURCES += qdir.qrc QT = core -wince*|symbian { +wince* { DirFiles.files = testdir testData searchdir resources entrylist types tst_qdir.cpp DirFiles.path = . DEPLOYMENT += DirFiles @@ -11,12 +11,6 @@ wince*|symbian { wince* { DEFINES += SRCDIR=\\\"\\\" -} else:symbian { - TARGET.CAPABILITY += AllFiles - TARGET.UID3 = 0xE0340002 - DEFINES += SYMBIAN_SRCDIR_UID=$$lower($$replace(TARGET.UID3,"0x","")) - LIBS += -lefsrv - INCLUDEPATH += $$MW_LAYER_SYSTEMINCLUDE } else { DEFINES += SRCDIR=\\\"$$PWD/\\\" } diff --git a/tests/auto/corelib/io/qdir/tst_qdir.cpp b/tests/auto/corelib/io/qdir/tst_qdir.cpp index b317991570..7696c8b114 100644 --- a/tests/auto/corelib/io/qdir/tst_qdir.cpp +++ b/tests/auto/corelib/io/qdir/tst_qdir.cpp @@ -56,12 +56,7 @@ #include "../../../../shared/filesystem.h" -#if defined(Q_OS_SYMBIAN) -# include <f32file.h> -# define STRINGIFY(x) #x -# define TOSTRING(x) STRINGIFY(x) -# define SRCDIR "C:/Private/" TOSTRING(SYMBIAN_SRCDIR_UID) "/" -#elif defined(Q_OS_UNIX) +#if defined(Q_OS_UNIX) # include <unistd.h> # include <sys/stat.h> #endif @@ -70,12 +65,6 @@ #define Q_NO_SYMLINKS #endif -#if defined(Q_OS_SYMBIAN) -#define Q_NO_SYMLINKS -#define Q_NO_SYMLINKS_TO_DIRS -#endif - - //TESTED_CLASS= //TESTED_FILES= @@ -224,20 +213,10 @@ void tst_QDir::getSetCheck() tst_QDir::tst_QDir() { -#ifdef Q_OS_SYMBIAN - // Can't deploy empty test dir, so create it here - QDir dir(SRCDIR); - dir.mkdir("testData"); -#endif } tst_QDir::~tst_QDir() { -#ifdef Q_OS_SYMBIAN - // Remove created test dir - QDir dir(SRCDIR); - dir.rmdir("testData"); -#endif } void tst_QDir::construction() @@ -253,7 +232,7 @@ void tst_QDir::setPath_data() QTest::addColumn<QString>("dir2"); QTest::newRow("data0") << QString(".") << QString(".."); -#if (defined(Q_WS_WIN) && !defined(Q_OS_WINCE)) || defined(Q_OS_SYMBIAN) +#if (defined(Q_WS_WIN) && !defined(Q_OS_WINCE)) QTest::newRow("data1") << QString("c:/") << QDir::currentPath(); #endif } @@ -372,7 +351,7 @@ void tst_QDir::exists_data() QTest::newRow("unc 8") << "//" + QtNetworkSettings::winServerName() + "/asharethatshouldnotexist" << false; QTest::newRow("unc 9") << "//ahostthatshouldnotexist" << false; #endif -#if (defined(Q_OS_WIN) && !defined(Q_OS_WINCE)) || defined(Q_OS_SYMBIAN) +#if (defined(Q_OS_WIN) && !defined(Q_OS_WINCE)) QTest::newRow("This drive should exist") << "C:/" << true; // find a non-existing drive and check if it does not exist QFileInfoList drives = QFSFileEngine::drives(); @@ -408,7 +387,7 @@ void tst_QDir::isRelativePath_data() QTest::addColumn<bool>("relative"); QTest::newRow("data0") << "../somedir" << true; -#if (defined(Q_WS_WIN) && !defined(Q_OS_WINCE)) || defined(Q_OS_SYMBIAN) +#if (defined(Q_WS_WIN) && !defined(Q_OS_WINCE)) QTest::newRow("data1") << "C:/sOmedir" << false; #endif QTest::newRow("data2") << "somedir" << true; @@ -617,8 +596,8 @@ void tst_QDir::entryList() QFile::remove(SRCDIR "entrylist/brokenlink.lnk"); QFile::remove(SRCDIR "entrylist/brokenlink"); - // WinCE/Symbian does not have . and .. in the directory listing -#if defined(Q_OS_WINCE) || defined(Q_OS_SYMBIAN) + // WinCE does not have . and .. in the directory listing +#if defined(Q_OS_WINCE) expected.removeAll("."); expected.removeAll(".."); #endif @@ -629,50 +608,6 @@ void tst_QDir::entryList() QFile::link(SRCDIR "entryList/file", SRCDIR "entrylist/linktofile.lnk"); QFile::link(SRCDIR "entryList/directory", SRCDIR "entrylist/linktodirectory.lnk"); QFile::link(SRCDIR "entryList/nothing", SRCDIR "entrylist/brokenlink.lnk"); -#elif defined(Q_OS_SYMBIAN) - // Symbian doesn't support links to directories - expected.removeAll("linktodirectory.lnk"); - - // Expecting failures from a couple of OpenC bugs. Do checks only once. - static int xFailChecked = false; - static int expectedFail1 = false; - static int expectedFail2 = false; - - if (!expectedFail1) { - // Can't create link if file doesn't exist in symbian, so create file temporarily, - // But only if testing for - QFile tempFile(SRCDIR "entryList/nothing"); - tempFile.open(QIODevice::WriteOnly); - tempFile.link(SRCDIR "entryList/brokenlink.lnk"); - tempFile.remove(); - } - - if (!expectedFail2) { - QFile::link(SRCDIR "entryList/file", SRCDIR "entrylist/linktofile.lnk"); - } - - if (!xFailChecked) { - // ### Until OpenC supports stat correctly for symbolic links, expect them to fail. - expectedFail1 = QFileInfo(SRCDIR "entryList/brokenlink.lnk").exists(); - expectedFail2 = !(QFileInfo(SRCDIR "entryList/linktofile.lnk").isFile()); - - QEXPECT_FAIL("", "OpenC bug, stat for broken links returns normally, when it should return error.", Continue); - QVERIFY(!expectedFail1); - - QEXPECT_FAIL("", "OpenC bug, stat for file links doesn't indicate them as such.", Continue); - QVERIFY(!expectedFail2); - xFailChecked = true; - } - - if (expectedFail1) { - expected.removeAll("brokenlink.lnk"); - QFile::remove(SRCDIR "entrylist/brokenlink.lnk"); - } - - if (expectedFail2) { - expected.removeAll("linktofile.lnk"); - QFile::remove(SRCDIR "entrylist/linktofile.lnk"); - } #else QFile::link("file", SRCDIR "entrylist/linktofile.lnk"); QFile::link("directory", SRCDIR "entrylist/linktodirectory.lnk"); @@ -698,7 +633,7 @@ void tst_QDir::entryList() return; } bool doContentCheck = true; -#if defined(Q_OS_UNIX) && !defined(Q_OS_SYMBIAN) +#if defined(Q_OS_UNIX) if (qstrcmp(QTest::currentDataTag(), "QDir::AllEntries | QDir::Writable") == 0) { // for root, everything is writeable if (::getuid() == 0) @@ -713,11 +648,6 @@ void tst_QDir::entryList() QCOMPARE(actual.count(), expected.count()); } -#if defined(Q_OS_SYMBIAN) - // Test cleanup on device requires setting the permissions back to normal - QFile(SRCDIR "entrylist/file").setPermissions(QFile::WriteUser | QFile::ReadUser); -#endif - QFile::remove(SRCDIR "entrylist/writable"); QFile::remove(SRCDIR "entrylist/linktofile"); QFile::remove(SRCDIR "entrylist/linktodirectory"); @@ -733,7 +663,7 @@ void tst_QDir::entryListSimple_data() QTest::addColumn<int>("countMin"); QTest::newRow("data2") << "do_not_expect_this_path_to_exist/" << 0; -#if defined(Q_OS_WINCE) || defined(Q_OS_SYMBIAN) +#if defined(Q_OS_WINCE) QTest::newRow("simple dir") << SRCDIR "resources" << 0; QTest::newRow("simple dir with slash") << SRCDIR "resources/" << 0; #else @@ -794,9 +724,6 @@ void tst_QDir::entryListWithSymLinks() # ifndef Q_NO_SYMLINKS_TO_DIRS QVERIFY(entryList.contains("myLinkToDir.lnk")); #endif -#if defined(Q_OS_SYMBIAN) - QEXPECT_FAIL("", "OpenC stat for symlinks is buggy.", Continue); -#endif QVERIFY(!entryList.contains("myLinkToFile.lnk")); } { @@ -852,7 +779,7 @@ void tst_QDir::canonicalPath_data() QTest::newRow("rootPath + ./") << QDir::rootPath().append("./") << QDir::rootPath(); QTest::newRow("rootPath + ../.. ") << QDir::rootPath().append("../..") << QDir::rootPath(); -#if defined(Q_OS_WIN) || defined(Q_OS_SYMBIAN) +#if defined(Q_OS_WIN) QTest::newRow("drive:\\") << QDir::toNativeSeparators(QDir::rootPath()) << QDir::rootPath(); QTest::newRow("drive:\\.\\") << QDir::toNativeSeparators(QDir::rootPath().append("./")) << QDir::rootPath(); QTest::newRow("drive:\\..\\..") << QDir::toNativeSeparators(QDir::rootPath().append("../..")) << QDir::rootPath(); @@ -879,7 +806,7 @@ void tst_QDir::canonicalPath() QFETCH(QString, canonicalPath); QDir dir(path); -#if defined(Q_OS_WIN) || defined(Q_OS_SYMBIAN) +#if defined(Q_OS_WIN) QCOMPARE(dir.canonicalPath().toLower(), canonicalPath.toLower()); #else QCOMPARE(dir.canonicalPath(), canonicalPath); @@ -934,7 +861,7 @@ void tst_QDir::current() if (!currentDir.isEmpty()) { QDir newCurrent = QDir::current(); QDir::setCurrent(oldDir); -#if defined(Q_OS_WIN) || defined(Q_OS_SYMBIAN) +#if defined(Q_OS_WIN) QCOMPARE(newCurrent.absolutePath().toLower(), currentDir.toLower()); #else QCOMPARE(newCurrent.absolutePath(), currentDir); @@ -955,7 +882,7 @@ void tst_QDir::cd_data() int index = appPath.lastIndexOf("/"); QTest::newRow("cdUp") << QDir::currentPath() << ".." << true << appPath.left(index==0?1:index); QTest::newRow("noChange") << QDir::currentPath() << "." << true << appPath; -#if defined(Q_OS_WIN) || defined(Q_OS_SYMBIAN) // on windows QDir::root() is usually c:/ but cd "/" will not force it to be root +#if defined(Q_OS_WIN) // on windows QDir::root() is usually c:/ but cd "/" will not force it to be root QTest::newRow("absolute") << QDir::currentPath() << "/" << true << "/"; #else QTest::newRow("absolute") << QDir::currentPath() << "/" << true << QDir::root().absolutePath(); @@ -1036,7 +963,7 @@ tst_QDir::cleanPath_data() QTest::newRow("data3") << QDir::cleanPath("../.") << ".."; QTest::newRow("data4") << QDir::cleanPath("../..") << "../.."; #if !defined(Q_OS_WINCE) -#if defined(Q_OS_WIN) || defined(Q_OS_SYMBIAN) +#if defined(Q_OS_WIN) QTest::newRow("data5") << "d:\\a\\bc\\def\\.." << "d:/a/bc"; QTest::newRow("data6") << "d:\\a\\bc\\def\\../../.." << "d:/"; #else @@ -1100,12 +1027,10 @@ void tst_QDir::absolutePath_data() QTest::addColumn<QString>("expectedPath"); QTest::newRow("0") << "/machine/share/dir1" << "/machine/share/dir1"; -#if (defined(Q_OS_WIN) && !defined(Q_OS_WINCE)) || defined(Q_OS_SYMBIAN) +#if (defined(Q_OS_WIN) && !defined(Q_OS_WINCE)) QTest::newRow("1") << "\\machine\\share\\dir1" << "/machine/share/dir1"; -# if !defined(Q_OS_SYMBIAN) QTest::newRow("2") << "//machine/share/dir1" << "//machine/share/dir1"; QTest::newRow("3") << "\\\\machine\\share\\dir1" << "//machine/share/dir1"; -# endif QTest::newRow("4") << "c:/machine/share/dir1" << "c:/machine/share/dir1"; QTest::newRow("5") << "c:\\machine\\share\\dir1" << "c:/machine/share/dir1"; #endif @@ -1148,7 +1073,7 @@ void tst_QDir::relativeFilePath_data() QTest::newRow("11") << "" << "" << ""; -#if (defined(Q_OS_WIN) && !defined(Q_OS_WINCE)) || defined(Q_OS_SYMBIAN) +#if (defined(Q_OS_WIN) && !defined(Q_OS_WINCE)) QTest::newRow("12") << "C:/foo/bar" << "ding" << "ding"; QTest::newRow("13") << "C:/foo/bar" << "C:/ding/dong" << "../../ding/dong"; QTest::newRow("14") << "C:/foo/bar" << "/ding/dong" << "../../ding/dong"; @@ -1167,12 +1092,10 @@ void tst_QDir::relativeFilePath_data() QTest::newRow("27") << "C:" << "D:/" << "D:/"; QTest::newRow("28") << "C:/" << "D:" << "D:"; QTest::newRow("29") << "C:/" << "D:/" << "D:/"; -# if !defined(Q_OS_SYMBIAN) QTest::newRow("30") << "C:/foo/bar" << "//anotherHost/foo/bar" << "//anotherHost/foo/bar"; QTest::newRow("31") << "//anotherHost/foo" << "//anotherHost/foo/bar" << "bar"; QTest::newRow("32") << "//anotherHost/foo" << "bar" << "bar"; QTest::newRow("33") << "//anotherHost/foo" << "C:/foo/bar" << "C:/foo/bar"; -# endif #endif QTest::newRow("resource0") << ":/prefix" << "foo.bar" << "foo.bar"; @@ -1235,8 +1158,6 @@ void tst_QDir::rename() QVERIFY(dir.rename("rename-test-renamed", "rename-test")); #if defined(Q_OS_MAC) QVERIFY(!dir.rename("rename-test", "/etc/rename-test-renamed")); -#elif defined(Q_OS_SYMBIAN) - QVERIFY(!dir.rename("rename-test", "/resource/rename-test-renamed")); #elif !defined(Q_OS_WIN) // on windows this is possible - maybe make the test a bit better QVERIFY(!dir.rename("rename-test", "/rename-test-renamed")); @@ -1295,7 +1216,7 @@ 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"; -#if defined(Q_OS_WIN) || defined(Q_OS_SYMBIAN) +#if defined(Q_OS_WIN) QTest::newRow("bslash0") << "c:\\winnt\\system32" << "system32"; QTest::newRow("bslash1") << "\\winnt\\system32" << "system32"; QTest::newRow("bslash2") << "c:\\winnt\\system32\\kernel32.dll" << "kernel32.dll"; @@ -1322,8 +1243,8 @@ void tst_QDir::operator_eq() void tst_QDir::dotAndDotDot() { -#if defined(Q_OS_WINCE) || defined(Q_OS_SYMBIAN) - QSKIP("WinCE and Symbian do not have . nor ..", SkipAll); +#if defined(Q_OS_WINCE) + QSKIP("WinCE does not have . nor ..", SkipAll); #else QDir dir(QString(SRCDIR "testdir/")); QStringList entryList = dir.entryList(QDir::Dirs); @@ -1384,14 +1305,14 @@ void tst_QDir::rootPath() QCOMPARE(path, dir.absolutePath()); QVERIFY(QDir::isAbsolutePath(path)); -#if defined(Q_OS_UNIX) && !defined(Q_OS_SYMBIAN) +#if defined(Q_OS_UNIX) QCOMPARE(path, QString("/")); #endif } void tst_QDir::nativeSeparators() { -#if defined(Q_OS_WIN) || defined(Q_OS_SYMBIAN) +#if defined(Q_OS_WIN) QCOMPARE(QDir::toNativeSeparators(QLatin1String("/")), QString("\\")); QCOMPARE(QDir::toNativeSeparators(QLatin1String("\\")), QString("\\")); QCOMPARE(QDir::fromNativeSeparators(QLatin1String("/")), QString("/")); @@ -1564,7 +1485,7 @@ void tst_QDir::updateFileLists() QDir dir("update-file-lists"); -#if defined(Q_OS_SYMBIAN) || defined(Q_OS_WINCE) +#if defined(Q_OS_WINCE) //no . and .. on these OS. QCOMPARE(dir.count(), uint(4)); QCOMPARE(dir.entryList().size(), 4); @@ -1762,7 +1683,7 @@ void tst_QDir::isRoot_data() #endif QTest::newRow(QString("canonicalPath " + test).toLatin1()) << test << true; -#if defined(Q_OS_WIN) || defined(Q_OS_SYMBIAN) +#if defined(Q_OS_WIN) test = QDir::rootPath().left(2); QTest::newRow(QString("drive relative " + test).toLatin1()) << test << false; #endif @@ -1811,32 +1732,18 @@ void tst_QDir::drives() #if defined(Q_OS_WIN) QVERIFY(list.count() >= 1); //system QLatin1Char systemdrive('c'); -#elif defined(Q_OS_SYMBIAN) - QVERIFY(list.count() >= 2); //system, rom - QLatin1Char romdrive('z'); - QLatin1Char systemdrive('a' + int(RFs::GetSystemDrive())); #endif -#if defined(Q_OS_WIN) || defined(Q_OS_SYMBIAN) +#if defined(Q_OS_WIN) QVERIFY(list.count() <= 26); bool foundsystem = false; -#ifdef Q_OS_SYMBIAN - bool foundrom = false; -#endif foreach (QFileInfo fi, list) { QCOMPARE(fi.absolutePath().size(), 3); //"x:/" QCOMPARE(fi.absolutePath().at(1), QChar(QLatin1Char(':'))); QCOMPARE(fi.absolutePath().at(2), QChar(QLatin1Char('/'))); if (fi.absolutePath().at(0).toLower() == systemdrive) foundsystem = true; -#ifdef Q_OS_SYMBIAN - if (fi.absolutePath().at(0).toLower() == romdrive) - foundrom = true; -#endif } QCOMPARE(foundsystem, true); -#ifdef Q_OS_SYMBIAN - QCOMPARE(foundrom, true); -#endif #else QCOMPARE(list.count(), 1); //root QCOMPARE(list.at(0).absolutePath(), QLatin1String("/")); @@ -1951,7 +1858,7 @@ void tst_QDir::isReadable() QDir dir; QVERIFY(dir.isReadable()); -#if defined (Q_OS_UNIX) && !defined (Q_OS_SYMBIAN) +#if defined (Q_OS_UNIX) QVERIFY(dir.mkdir("nonreadabledir")); QVERIFY(0 == ::chmod("nonreadabledir", 0)); QVERIFY(!QDir("nonreadabledir").isReadable()); diff --git a/tests/auto/corelib/io/qdiriterator/tst_qdiriterator.cpp b/tests/auto/corelib/io/qdiriterator/tst_qdiriterator.cpp index 9014da9033..db8a0223e5 100644 --- a/tests/auto/corelib/io/qdiriterator/tst_qdiriterator.cpp +++ b/tests/auto/corelib/io/qdiriterator/tst_qdiriterator.cpp @@ -52,11 +52,6 @@ #define Q_NO_SYMLINKS #endif -#if defined(Q_OS_SYMBIAN) -#define Q_NO_SYMLINKS -#define Q_NO_SYMLINKS_TO_DIRS -#endif - #if defined(Q_OS_WIN) && !defined(Q_OS_WINCE) # include "../../../network-settings.h" #endif @@ -159,7 +154,7 @@ tst_QDirIterator::tst_QDirIterator() createDirectory("empty"); #ifndef Q_NO_SYMLINKS -# if defined(Q_OS_WIN) || defined(Q_OS_SYMBIAN) +# if defined(Q_OS_WIN) // ### Sadly, this is a platform difference right now. createLink("entrylist/file", "entrylist/linktofile.lnk"); # ifndef Q_NO_SYMLINKS_TO_DIRS @@ -211,7 +206,7 @@ void tst_QDirIterator::iterateRelativeDirectory_data() << QString("entrylist") << QDirIterator::IteratorFlags(0) << QDir::Filters(QDir::NoFilter) << QStringList("*") << QString( -#if !defined(Q_OS_WINCE) && !defined(Q_OS_SYMBIAN) +#if !defined(Q_OS_WINCE) "entrylist/.," "entrylist/..," #endif @@ -229,7 +224,7 @@ void tst_QDirIterator::iterateRelativeDirectory_data() << QString("entrylist") << QDirIterator::IteratorFlags(0) << QDir::Filters(QDir::AllEntries | QDir::NoDot) << QStringList("*") << QString( -#if !defined(Q_OS_WINCE) && !defined(Q_OS_SYMBIAN) +#if !defined(Q_OS_WINCE) "entrylist/..," #endif "entrylist/file," @@ -246,7 +241,7 @@ void tst_QDirIterator::iterateRelativeDirectory_data() << QString("entrylist") << QDirIterator::IteratorFlags(0) << QDir::Filters(QDir::AllEntries | QDir::NoDotDot) << QStringList("*") << QString( -#if !defined(Q_OS_WINCE) && !defined(Q_OS_SYMBIAN) +#if !defined(Q_OS_WINCE) "entrylist/.," #endif "entrylist/file," @@ -277,7 +272,7 @@ void tst_QDirIterator::iterateRelativeDirectory_data() << QString("entrylist") << QDirIterator::IteratorFlags(QDirIterator::Subdirectories | QDirIterator::FollowSymlinks) << QDir::Filters(QDir::NoFilter) << QStringList("*") << QString( -#if !defined(Q_OS_WINCE) && !defined(Q_OS_SYMBIAN) +#if !defined(Q_OS_WINCE) "entrylist/.," "entrylist/..," "entrylist/directory/.," @@ -317,7 +312,7 @@ void tst_QDirIterator::iterateRelativeDirectory_data() QTest::newRow("empty, default") << QString("empty") << QDirIterator::IteratorFlags(0) << QDir::Filters(QDir::NoFilter) << QStringList("*") -#if defined(Q_OS_SYMBIAN) || defined(Q_OS_WINCE) +#if defined(Q_OS_WINCE) << QStringList(); #else << QString("empty/.,empty/..").split(','); diff --git a/tests/auto/corelib/io/qfile/qfile.pro b/tests/auto/corelib/io/qfile/qfile.pro index f41d32789a..8bb142c5b4 100644 --- a/tests/auto/corelib/io/qfile/qfile.pro +++ b/tests/auto/corelib/io/qfile/qfile.pro @@ -1,10 +1,10 @@ TEMPLATE = subdirs -wince*|symbian:{ +wince* { SUBDIRS = test } else { SUBDIRS = test stdinprocess } -!symbian:SUBDIRS += largefile +SUBDIRS += largefile CONFIG += parallel_test diff --git a/tests/auto/corelib/io/qfile/test/test.pro b/tests/auto/corelib/io/qfile/test/test.pro index f4ec12f874..366432c57e 100644 --- a/tests/auto/corelib/io/qfile/test/test.pro +++ b/tests/auto/corelib/io/qfile/test/test.pro @@ -1,7 +1,7 @@ load(qttest_p4) SOURCES += ../tst_qfile.cpp -wince*|symbian { +wince* { QT = core gui files.files += ..\\dosfile.txt ..\\noendofline.txt ..\\testfile.txt \ ..\\testlog.txt ..\\two.dots.file ..\\tst_qfile.cpp \ @@ -16,9 +16,6 @@ wince*|symbian { wince* { SOURCES += $$QT_SOURCE_TREE/src/corelib/kernel/qfunctions_wince.cpp # needed for QT_OPEN DEFINES += SRCDIR=\\\"\\\" -} else:symbian { - # do not define SRCDIR at all - TARGET.EPOCHEAPSIZE = 0x100000 0x3000000 } else { QT = core network DEFINES += SRCDIR=\\\"$$PWD/../\\\" @@ -37,8 +34,4 @@ win32 { LIBS+=-lole32 -luuid } -symbian { - LIBS+=-lefsrv -} - mac*:CONFIG+=insignificant_test diff --git a/tests/auto/corelib/io/qfile/tst_qfile.cpp b/tests/auto/corelib/io/qfile/tst_qfile.cpp index f2031497ed..c245661b14 100644 --- a/tests/auto/corelib/io/qfile/tst_qfile.cpp +++ b/tests/auto/corelib/io/qfile/tst_qfile.cpp @@ -50,7 +50,7 @@ #include <QDir> #include <QFile> #include <QFileInfo> -#if !defined(Q_OS_WINCE) && !defined(Q_OS_SYMBIAN) +#if !defined(Q_OS_WINCE) #include <QHostInfo> #endif #include <QProcess> @@ -70,18 +70,12 @@ #elif defined(Q_OS_WINCE) # include <qplatformdefs.h> # include <private/qfsfileengine_p.h> -#elif defined(Q_OS_SYMBIAN) -# include <f32file.h> #endif #include <stdio.h> #include <errno.h> #include "../../../network-settings.h" -#if defined(Q_OS_SYMBIAN) -# define SRCDIR "" -#endif - #ifndef STDIN_FILENO #define STDIN_FILENO 0 #endif @@ -218,10 +212,7 @@ private slots: void resize(); void objectConstructors(); -#ifdef Q_OS_SYMBIAN - void platformSecurity_data(); - void platformSecurity(); -#endif + void caseSensitivity(); void autocloseHandle(); @@ -242,9 +233,6 @@ private: OpenQFile, OpenFd, OpenStream, -#ifdef Q_OS_SYMBIAN - OpenRFile, -#endif NumberOfFileTypes }; @@ -281,33 +269,6 @@ private: return stream_ && file.open(stream_, mode, handleFlags); } -#ifdef Q_OS_SYMBIAN - bool openRFile(QFile &file, QIODevice::OpenMode mode, QFile::FileHandleFlags handleFlags) - { - //connect file server first time - if (!rfs_.Handle() && rfs_.Connect() != KErrNone) - return false; - //symbian does not like ./ in filenames, so open by absolute path - QString fileName(QDir::toNativeSeparators(QFileInfo(file).absoluteFilePath())); - TPtrC fn(fileName.utf16(), fileName.length()); - TInt smode = 0; - if (mode & QIODevice::WriteOnly) - smode |= EFileWrite; - if (mode & QIODevice::ReadOnly) - smode |= EFileRead; - TInt r; - if ((mode & QIODevice::Truncate) || (!(mode & QIODevice::ReadOnly) && !(mode & QIODevice::Append))) { - r = rfile_.Replace(rfs_, fn, smode); - } else { - r = rfile_.Open(rfs_, fn, smode); - if (r == KErrNotFound && (mode & QIODevice::WriteOnly)) { - r = rfile_.Create(rfs_, fn, smode); - } - } - return (r == KErrNone) && file.open(rfile_, mode, handleFlags); - } -#endif - bool openFile(QFile &file, QIODevice::OpenMode mode, FileType type = OpenQFile, QFile::FileHandleFlags handleFlags = QFile::DontCloseHandle) { if (mode & QIODevice::WriteOnly && !file.exists()) @@ -329,10 +290,7 @@ private: case OpenStream: return openStream(file, mode, handleFlags); -#ifdef Q_OS_SYMBIAN - case OpenRFile: - return openRFile(file, mode, handleFlags); -#endif + case NumberOfFileTypes: break; } @@ -348,10 +306,6 @@ private: QT_CLOSE(fd_); if (stream_) ::fclose(stream_); -#ifdef Q_OS_SYMBIAN - if (rfile_.SubSessionHandle()) - rfile_.Close(); -#endif fd_ = -1; stream_ = 0; @@ -359,10 +313,6 @@ private: int fd_; FILE *stream_; -#ifdef Q_OS_SYMBIAN - RFs rfs_; - RFile rfile_; -#endif }; tst_QFile::tst_QFile() @@ -562,10 +512,7 @@ void tst_QFile::open() QFETCH( bool, ok ); -#if defined(Q_OS_SYMBIAN) - if (qstrcmp(QTest::currentDataTag(), "noreadfile") == 0) - QSKIP("Symbian does not support non-readable files", SkipSingle); -#elif defined(Q_OS_UNIX) +#if defined(Q_OS_UNIX) if (::getuid() == 0) // root and Chuck Norris don't care for file permissions. Skip. QSKIP("Running this test as root doesn't make sense", SkipAll); @@ -897,8 +844,8 @@ void tst_QFile::readAllBuffer() void tst_QFile::readAllStdin() { -#if defined(Q_OS_WINCE) || defined(Q_OS_SYMBIAN) - QSKIP("Currently no stdin/out supported for Windows CE or Symbian", SkipAll); +#if defined(Q_OS_WINCE) + QSKIP("Currently no stdin/out supported for Windows CE", SkipAll); #endif #if defined(QT_NO_PROCESS) QSKIP("Qt was compiled with QT_NO_PROCESS", SkipAll); @@ -924,8 +871,8 @@ void tst_QFile::readAllStdin() void tst_QFile::readLineStdin() { -#if defined(Q_OS_WINCE) || defined(Q_OS_SYMBIAN) - QSKIP("Currently no stdin/out supported for Windows CE or Symbian", SkipAll); +#if defined(Q_OS_WINCE) + QSKIP("Currently no stdin/out supported for Windows CE", SkipAll); #endif #if defined(QT_NO_PROCESS) QSKIP("Qt was compiled with QT_NO_PROCESS", SkipAll); @@ -967,7 +914,7 @@ void tst_QFile::readLineStdin() void tst_QFile::readLineStdin_lineByLine() { -#if defined(Q_OS_WINCE) || defined(Q_OS_SYMBIAN) +#if defined(Q_OS_WINCE) QSKIP("Currently no stdin/out supported for Windows CE", SkipAll); #endif #if defined(QT_NO_PROCESS) @@ -1095,7 +1042,7 @@ void tst_QFile::ungetChar() void tst_QFile::invalidFile_data() { QTest::addColumn<QString>("fileName"); -#if !defined(Q_WS_WIN) && !defined(Q_OS_SYMBIAN) +#if !defined(Q_WS_WIN) QTest::newRow( "x11" ) << QString( "qwe//" ); #else QTest::newRow( "colon1" ) << QString( "fail:invalid" ); @@ -1165,10 +1112,6 @@ void tst_QFile::permissions_data() void tst_QFile::permissions() { -#if defined(Q_OS_SYMBIAN) - if (qstrcmp(QTest::currentDataTag(), "data0") == 0) - QSKIP("Symbian does not have execution permissions", SkipSingle); -#endif QFETCH(QString, file); QFETCH(uint, perms); QFETCH(bool, expected); @@ -1261,11 +1204,8 @@ void tst_QFile::copyShouldntOverwrite() QFile::remove("tst_qfile.cpy"); QFile file(SRCDIR "tst_qfile.cpp"); QVERIFY(file.copy("tst_qfile.cpy")); -#if defined(Q_OS_SYMBIAN) - bool ok = QFile::setPermissions("tst_qfile.cpy", QFile::WriteUser); -#else - bool ok = QFile::setPermissions("tst_qfile.cpy", QFile::WriteOther); -#endif + + bool ok = QFile::setPermissions("tst_qfile.cpy", QFile::WriteOther); QVERIFY(ok); QVERIFY(!file.copy("tst_qfile.cpy")); QFile::remove("tst_qfile.cpy"); @@ -1352,9 +1292,6 @@ static QString getWorkingDirectoryForLink(const QString &linkFileName) void tst_QFile::link() { -#if defined(Q_OS_SYMBIAN) - QSKIP("Symbian does not support links", SkipAll); -#endif QFile::remove("myLink.lnk"); QFileInfo info1(SRCDIR "tst_qfile.cpp"); @@ -1383,9 +1320,6 @@ void tst_QFile::link() void tst_QFile::linkToDir() { -#if defined(Q_OS_SYMBIAN) - QSKIP("Symbian does not support linking to directories", SkipAll); -#endif QFile::remove("myLinkToDir.lnk"); QDir dir; dir.mkdir("myDir"); @@ -1406,9 +1340,6 @@ void tst_QFile::linkToDir() void tst_QFile::absolutePathLinkToRelativePath() { -#if defined(Q_OS_SYMBIAN) - QSKIP("Symbian does not support links", SkipAll); -#endif QFile::remove("myDir/test.txt"); QFile::remove("myDir/myLink.lnk"); QDir dir; @@ -1420,7 +1351,7 @@ void tst_QFile::absolutePathLinkToRelativePath() #else QVERIFY(QFile::link("myDir/test.txt", "myDir/myLink.lnk")); #endif - QEXPECT_FAIL("", "Symlinking using relative paths is currently different on Windows and Unix/Symbian", Continue); + QEXPECT_FAIL("", "Symlinking using relative paths is currently different on Windows and Unix", Continue); QCOMPARE(QFileInfo(QFile(QFileInfo("myDir/myLink.lnk").absoluteFilePath()).symLinkTarget()).absoluteFilePath(), QFileInfo("myDir/test.txt").absoluteFilePath()); @@ -1431,29 +1362,15 @@ void tst_QFile::absolutePathLinkToRelativePath() void tst_QFile::readBrokenLink() { -#if defined(Q_OS_SYMBIAN) - QSKIP("Symbian does not support links", SkipAll); -#endif QFile::remove("myLink2.lnk"); QFileInfo info1("file12"); -#if defined(Q_OS_SYMBIAN) - // In Symbian can't link to nonexisting file directly, so create the file temporarily - QFile tempFile("file12"); - tempFile.open(QIODevice::WriteOnly); - tempFile.link("myLink2.lnk"); - tempFile.remove(); -#else QVERIFY(QFile::link("file12", "myLink2.lnk")); -#endif QFileInfo info2("myLink2.lnk"); QVERIFY(info2.isSymLink()); QCOMPARE(info2.symLinkTarget(), info1.absoluteFilePath()); QVERIFY(QFile::remove(info2.absoluteFilePath())); - -#if !defined(Q_OS_SYMBIAN) QVERIFY(QFile::link("ole/..", "myLink2.lnk")); QCOMPARE(QFileInfo("myLink2.lnk").symLinkTarget(), QDir::currentPath()); -#endif } void tst_QFile::readTextFile_data() @@ -1666,7 +1583,7 @@ void tst_QFile::bufferedRead() void tst_QFile::isSequential() { -#if defined (Q_OS_WIN) || defined(Q_OS_SYMBIAN) +#if defined (Q_OS_WIN) QSKIP("Unix only test.", SkipAll); #endif @@ -2005,7 +1922,7 @@ void tst_QFile::longFileName() } { QFile file(fileName); -#if defined(Q_OS_WINCE) || defined(Q_OS_SYMBIAN) +#if defined(Q_OS_WINCE) QEXPECT_FAIL("244 chars", "Full pathname must be less than 260 chars", Abort); QEXPECT_FAIL("244 chars to absolutepath", "Full pathname must be less than 260 chars", Abort); #endif @@ -2268,9 +2185,6 @@ void tst_QFile::writeLargeDataBlock_data() QTest::newRow("localfile-QFile") << "./largeblockfile.txt" << (int)OpenQFile; QTest::newRow("localfile-Fd") << "./largeblockfile.txt" << (int)OpenFd; QTest::newRow("localfile-Stream") << "./largeblockfile.txt" << (int)OpenStream; -#ifdef Q_OS_SYMBIAN - QTest::newRow("localfile-RFile") << "./largeblockfile.txt" << (int)OpenRFile; -#endif #if defined(Q_OS_WIN) && !defined(Q_OS_WINCE) // Some semi-randomness to avoid collisions. @@ -2287,8 +2201,8 @@ static QByteArray getLargeDataBlock() if (array.isNull()) { -#if defined(Q_OS_WINCE) || defined(Q_OS_SYMBIAN) - int resizeSize = 1024 * 1024; // WinCE and Symbian do not have much space +#if defined(Q_OS_WINCE) + int resizeSize = 1024 * 1024; // WinCE does not have much space #else int resizeSize = 64 * 1024 * 1024; #endif @@ -2439,7 +2353,7 @@ void tst_QFile::rename_data() QTest::newRow("a -> .") << QString("a") << QString(".") << false; QTest::newRow("renamefile -> renamefile") << QString("renamefile") << QString("renamefile") << false; QTest::newRow("renamefile -> noreadfile") << QString("renamefile") << QString("noreadfile") << false; -#if defined(Q_OS_UNIX) && !defined(Q_OS_SYMBIAN) +#if defined(Q_OS_UNIX) QTest::newRow("renamefile -> /etc/renamefile") << QString("renamefile") << QString("/etc/renamefile") << false; #endif QTest::newRow("renamefile -> renamedfile") << QString("renamefile") << QString("renamedfile") << true; @@ -2616,7 +2530,7 @@ void tst_QFile::standarderror() void tst_QFile::handle() { int fd; -#if !defined(Q_OS_WINCE) && !defined(Q_OS_SYMBIAN) +#if !defined(Q_OS_WINCE) QFile file(SRCDIR "tst_qfile.cpp"); QVERIFY(file.open(QIODevice::ReadOnly)); fd = int(file.handle()); @@ -2666,9 +2580,6 @@ void tst_QFile::handle() void tst_QFile::nativeHandleLeaks() { -#ifdef Q_OS_SYMBIAN - QSKIP("test assumptions invalid for symbian", SkipAll); -#else int fd1, fd2; #ifdef Q_OS_WIN @@ -2710,7 +2621,6 @@ void tst_QFile::nativeHandleLeaks() #ifdef Q_OS_WIN QCOMPARE( handle2, handle1 ); #endif -#endif } void tst_QFile::readEof_data() @@ -2721,7 +2631,7 @@ void tst_QFile::readEof_data() QTest::newRow("buffered") << SRCDIR "testfile.txt" << 0; QTest::newRow("unbuffered") << SRCDIR "testfile.txt" << int(QIODevice::Unbuffered); -#if defined(Q_OS_UNIX) && !defined(Q_OS_SYMBIAN) +#if defined(Q_OS_UNIX) QTest::newRow("sequential,buffered") << "/dev/null" << 0; QTest::newRow("sequential,unbuffered") << "/dev/null" << int(QIODevice::Unbuffered); #endif @@ -2955,9 +2865,7 @@ void tst_QFile::map() file.close(); -#if defined(Q_OS_SYMBIAN) - if (false) // No permissions for user makes no sense in Symbian -#elif defined(Q_OS_UNIX) +#if defined(Q_OS_UNIX) if (::getuid() != 0) // root always has permissions #endif @@ -3120,7 +3028,7 @@ void tst_QFile::openStandardStreamsFileDescriptors() void tst_QFile::openStandardStreamsBufferedStreams() { -#if defined (Q_OS_WIN) || defined(Q_OS_SYMBIAN) +#if defined (Q_OS_WIN) QSKIP("Unix only test.", SkipAll); #endif // Using streams @@ -3173,9 +3081,6 @@ void tst_QFile::resize_data() QTest::newRow("native") << int(OpenQFile); QTest::newRow("fileno") << int(OpenFd); QTest::newRow("stream") << int(OpenStream); -#ifdef Q_OS_SYMBIAN - QTest::newRow("rfile") << int(OpenRFile); -#endif } void tst_QFile::resize() @@ -3201,65 +3106,9 @@ void tst_QFile::objectConstructors() QVERIFY(!file2->exists()); } -#ifdef Q_OS_SYMBIAN -void tst_QFile::platformSecurity_data() -{ - QTest::addColumn<QString>("file"); - QTest::addColumn<bool>("readable"); - QTest::addColumn<bool>("writable"); - - QString selfname = QCoreApplication::applicationFilePath(); - QString ownprivate = QCoreApplication::applicationDirPath(); - QString owndrive = selfname.left(2); - bool amiprivileged = RProcess().HasCapability(ECapabilityAllFiles); - QTest::newRow("resource") << owndrive + "/resource/apps/tst_qfile.rsc" << true << amiprivileged; - QTest::newRow("sys") << selfname << amiprivileged << false; - QTest::newRow("own private") << ownprivate + "/testfile.txt" << true << true; - QTest::newRow("other private") << owndrive + "/private/10003a3f/import/apps/tst_qfile_reg.rsc" << amiprivileged << amiprivileged; -} - -void tst_QFile::platformSecurity() -{ - QFETCH(QString,file); - QFETCH(bool,readable); - QFETCH(bool,writable); - - { - QFile f(file); - QCOMPARE(f.open(QIODevice::ReadOnly), readable); - } - - { - QFile f(file); - QCOMPARE(f.open(QIODevice::ReadOnly | QIODevice::Unbuffered), readable); - } - - //append mode used to avoid truncating the files. - { - QFile f(file); - QCOMPARE(f.open(QIODevice::WriteOnly | QIODevice::Append), writable); - } - - { - QFile f(file); - QCOMPARE(f.open(QIODevice::WriteOnly | QIODevice::Append | QIODevice::Unbuffered), writable); - } - - { - QFile f(file); - QCOMPARE(f.open(QIODevice::ReadWrite), writable); - } - - { - QFile f(file); - QCOMPARE(f.open(QIODevice::ReadWrite | QIODevice::Unbuffered), writable); - } -} -#endif - void tst_QFile::caseSensitivity() { -#if defined(Q_OS_SYMBIAN) || defined(Q_OS_WIN) || defined(Q_OS_MAC) +#if defined(Q_OS_WIN) || defined(Q_OS_MAC) const bool caseSensitive = false; #else const bool caseSensitive = true; @@ -3313,37 +3162,6 @@ public: void tst_QFile::autocloseHandle() { -#ifdef Q_OS_SYMBIAN - // these tests are a bit different, because using a closed file handle results in a panic rather than error - { - QFile file("readonlyfile"); - QFile file2("readonlyfile"); - QVERIFY(openFile(file, QIODevice::ReadOnly, OpenRFile, QFile::AutoCloseHandle)); - // file is opened with mandatory lock, so opening again should fail - QVERIFY(!file2.open(QIODevice::ReadOnly)); - - file.close(); - // opening again should now succeed (because handle is closed) - QVERIFY(file2.open(QIODevice::ReadOnly)); - } - - { - QFile file("readonlyfile"); - QFile file2("readonlyfile"); - QVERIFY(openFile(file, QIODevice::ReadOnly, OpenRFile, QFile::DontCloseHandle)); - // file is opened with mandatory lock, so opening again should fail - QVERIFY(!file2.open(QIODevice::ReadOnly)); - - file.close(); - // opening again should still fail (because handle is not auto closed) - QVERIFY(!file2.open(QIODevice::ReadOnly)); - - rfile_.Close(); - // now it should succeed - QVERIFY(file2.open(QIODevice::ReadOnly)); - } -#endif - { QFile file("readonlyfile"); QVERIFY(openFile(file, QIODevice::ReadOnly, OpenFd, QFile::AutoCloseHandle)); diff --git a/tests/auto/corelib/io/qfileinfo/qfileinfo.pro b/tests/auto/corelib/io/qfileinfo/qfileinfo.pro index 2fd626a57e..c3b9f4c2e3 100644 --- a/tests/auto/corelib/io/qfileinfo/qfileinfo.pro +++ b/tests/auto/corelib/io/qfileinfo/qfileinfo.pro @@ -6,7 +6,7 @@ QT = core-private RESOURCES += qfileinfo.qrc -wince*:|symbian: { +wince* { deploy.files += qfileinfo.qrc tst_qfileinfo.cpp res.files = resources\\file1 resources\\file1.ext1 resources\\file1.ext1.ext2 res.path = resources @@ -15,17 +15,9 @@ wince*:|symbian: { win32*:LIBS += -ladvapi32 -lnetapi32 -symbian { - TARGET.CAPABILITY=AllFiles - LIBS *= -lefsrv - INCLUDEPATH *= $$MW_LAYER_SYSTEMINCLUDE # Needed for e32svr.h in S^3 envs - } - # support for running test from shadow build directory wince* { DEFINES += SRCDIR=\\\"\\\" -} else:symbian { - # do not define SRCDIR at all } else { DEFINES += SRCDIR=\\\"$$PWD/\\\" } diff --git a/tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp b/tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp index 1eb59ac96a..212c2f9700 100644 --- a/tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp +++ b/tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp @@ -64,19 +64,10 @@ #endif #include <qplatformdefs.h> #include <qdebug.h> -#ifdef Q_OS_SYMBIAN -#include <f32file.h> -#include <private/qcore_symbian_p.h> -#endif #include "../../../network-settings.h" #include <private/qfileinfo_p.h> #include "../../../../shared/filesystem.h" -#if defined(Q_OS_SYMBIAN) -# define SRCDIR "" -# define NO_SYMLINKS -#endif - QT_BEGIN_NAMESPACE extern Q_AUTOTEST_EXPORT bool qIsLikelyToBeNfs(int /* handle */); QT_END_NAMESPACE @@ -191,7 +182,7 @@ private slots: void detachingOperations(); -#if !defined(Q_OS_WINCE) && !defined(Q_OS_SYMBIAN) +#if !defined(Q_OS_WINCE) void owner(); #endif void group(); @@ -211,14 +202,9 @@ tst_QFileInfo::~tst_QFileInfo() QFile::remove("dummyfile"); QFile::remove("simplefile.txt"); QFile::remove("longFileNamelongFileNamelongFileNamelongFileNamelongFileNamelongFileNamelongFileNamelongFileNamelongFileNamelongFileNamelongFileNamelongFileNamelongFileNamelongFileNamelongFileNamelongFileNamelongFileNamelongFileNamelongFileNamelongFileName.txt"); -#ifdef Q_OS_SYMBIAN - QFile::remove("hidden.txt"); - QFile::remove("nothidden.txt"); -#else QFile::remove("tempfile.txt"); -#endif -#if defined(Q_OS_UNIX) && !defined(Q_OS_SYMBIAN) +#if defined(Q_OS_UNIX) QDir().rmdir("./.hidden-directory"); QFile::remove("link_to_tst_qfileinfo"); #endif @@ -346,7 +332,7 @@ void tst_QFileInfo::isDir_data() QTest::newRow("broken link") << "brokenlink.lnk" << false; -#if (defined(Q_OS_WIN) && !defined(Q_OS_WINCE)) || defined(Q_OS_SYMBIAN) +#if (defined(Q_OS_WIN) && !defined(Q_OS_WINCE)) QTest::newRow("drive 1") << "c:" << true; QTest::newRow("drive 2") << "c:/" << true; //QTest::newRow("drive 2") << "t:s" << false; @@ -384,7 +370,7 @@ void tst_QFileInfo::isRoot_data() QTest::newRow("simple dir") << SRCDIR "resources" << false; QTest::newRow("simple dir with slash") << SRCDIR "resources/" << false; -#if (defined(Q_OS_WIN) && !defined(Q_OS_WINCE)) || defined(Q_OS_SYMBIAN) +#if (defined(Q_OS_WIN) && !defined(Q_OS_WINCE)) QTest::newRow("drive 1") << "c:" << false; QTest::newRow("drive 2") << "c:/" << true; QTest::newRow("drive 3") << "p:/" << false; @@ -459,7 +445,7 @@ void tst_QFileInfo::absolutePath_data() QTest::addColumn<QString>("filename"); QString drivePrefix; -#if (defined(Q_OS_WIN) && !defined(Q_OS_WINCE)) || defined(Q_OS_SYMBIAN) +#if (defined(Q_OS_WIN) && !defined(Q_OS_WINCE)) drivePrefix = QDir::currentPath().left(2); QString nonCurrentDrivePrefix = drivePrefix.left(1).compare("X", Qt::CaseInsensitive) == 0 ? QString("Y:") : QString("X:"); @@ -508,7 +494,7 @@ void tst_QFileInfo::absFilePath_data() QTest::newRow("relativeFile") << "tmp.txt" << QDir::currentPath() + "/tmp.txt"; QTest::newRow("relativeFileInSubDir") << "temp/tmp.txt" << QDir::currentPath() + "/" + "temp/tmp.txt"; QString drivePrefix; -#if (defined(Q_OS_WIN) && !defined(Q_OS_WINCE)) || defined(Q_OS_SYMBIAN) +#if (defined(Q_OS_WIN) && !defined(Q_OS_WINCE)) QString curr = QDir::currentPath(); curr.remove(0, 2); // Make it a absolute path with no drive specifier: \depot\qt-4.2\tests\auto\qfileinfo @@ -536,7 +522,7 @@ void tst_QFileInfo::absFilePath() QFETCH(QString, expected); QFileInfo fi(file); -#if defined(Q_OS_WIN) || defined(Q_OS_SYMBIAN) +#if defined(Q_OS_WIN) QVERIFY(QString::compare(fi.absoluteFilePath(), expected, Qt::CaseInsensitive) == 0); #else QCOMPARE(fi.absoluteFilePath(), expected); @@ -565,7 +551,7 @@ void tst_QFileInfo::canonicalFilePath() QFileInfo info("/tmp/../../../../../../../../../../../../../../../../../"); info.canonicalFilePath(); -#if defined(Q_OS_UNIX) && !defined(Q_OS_SYMBIAN) +#if defined(Q_OS_UNIX) // This used to crash on Mac QFileInfo dontCrash(QLatin1String("/")); QCOMPARE(dontCrash.canonicalFilePath(), QLatin1String("/")); @@ -582,8 +568,6 @@ void tst_QFileInfo::canonicalFilePath() QCOMPARE(info1.canonicalFilePath(), info2.canonicalFilePath()); } } -# if !defined(Q_OS_SYMBIAN) - // Symbian doesn't support links to directories { const QString link(QDir::tempPath() + QDir::separator() + "tst_qfileinfo"); QFile::remove(link); @@ -624,7 +608,6 @@ void tst_QFileInfo::canonicalFilePath() QCOMPARE(info1.canonicalFilePath(), info2.canonicalFilePath()); } } -# endif #endif #ifdef Q_OS_WIN @@ -663,7 +646,7 @@ void tst_QFileInfo::fileName_data() QTest::newRow("relativeFile") << "tmp.txt" << "tmp.txt"; QTest::newRow("relativeFileInSubDir") << "temp/tmp.txt" << "tmp.txt"; -#if (defined(Q_OS_WIN) && !defined(Q_OS_WINCE)) || defined(Q_OS_SYMBIAN) +#if (defined(Q_OS_WIN) && !defined(Q_OS_WINCE)) QTest::newRow("absFilePath") << "c:\\home\\andy\\tmp.txt" << "tmp.txt"; #else QTest::newRow("absFilePath") << "/home/andy/tmp.txt" << "tmp.txt"; @@ -863,9 +846,6 @@ void tst_QFileInfo::permission() QFETCH(QString, file); QFETCH(int, perms); QFETCH(bool, expected); -#ifdef Q_OS_SYMBIAN - QSKIP("No user based rights in Symbian OS - SOS needs platform security tests instead", SkipAll); -#endif QFileInfo fi(file); QCOMPARE(fi.permission(QFile::Permissions(perms)), expected); } @@ -937,7 +917,7 @@ void tst_QFileInfo::compare_data() QTest::newRow("casesense1") << QString::fromLatin1(SRCDIR "tst_qfileInfo.cpp") << QString::fromLatin1(SRCDIR "tst_qfileinfo.cpp") -#if defined(Q_OS_WIN) || defined(Q_OS_SYMBIAN) +#if defined(Q_OS_WIN) << true; #elif defined(Q_OS_MAC) << !caseSensitiveOnMac; @@ -960,7 +940,7 @@ void tst_QFileInfo::consistent_data() QTest::addColumn<QString>("file"); QTest::addColumn<QString>("expected"); -#if defined(Q_OS_WIN) || defined(Q_OS_SYMBIAN) +#if defined(Q_OS_WIN) QTest::newRow("slashes") << QString::fromLatin1("\\a\\a\\a\\a") << QString::fromLatin1("/a/a/a/a"); #endif QTest::newRow("ending slash") << QString::fromLatin1("/a/somedir/") << QString::fromLatin1("/a/somedir/"); @@ -1011,9 +991,6 @@ void tst_QFileInfo::fileTimes() #if defined(Q_OS_WINCE) QEXPECT_FAIL("longfile", "No long filenames on WinCE", Abort); QEXPECT_FAIL("longfile absolutepath", "No long filenames on WinCE", Abort); -#elif defined(Q_OS_SYMBIAN) - QEXPECT_FAIL("longfile", "Maximum total filepath cannot exceed 256 characters in Symbian", Abort); - QEXPECT_FAIL("longfile absolutepath", "Maximum total filepath cannot exceed 256 characters in Symbian", Abort); #endif QVERIFY(file.open(QFile::WriteOnly | QFile::Text)); #ifdef Q_OS_UNIX @@ -1061,9 +1038,6 @@ void tst_QFileInfo::fileTimes() #ifdef Q_OS_WINCE QEXPECT_FAIL("simple", "WinCE only stores date of access data, not the time", Continue); #endif -#ifdef Q_OS_SYMBIAN - QEXPECT_FAIL("simple", "Symbian implementation of stat doesn't return read time right", Abort); -#endif QVERIFY(fileInfo.lastRead() > beforeRead); QVERIFY(fileInfo.lastModified() > beforeWrite); QVERIFY(fileInfo.lastModified() < beforeRead); @@ -1176,7 +1150,7 @@ void tst_QFileInfo::isHidden_data() QTest::newRow("C:/path/to/hidden-directory") << QDir::currentPath() + QString::fromLatin1("/hidden-directory") << true; QTest::newRow("C:/path/to/hidden-directory/.") << QDir::currentPath() + QString::fromLatin1("/hidden-directory/.") << true; #endif -#if defined(Q_OS_UNIX) && !defined(Q_OS_SYMBIAN) +#if defined(Q_OS_UNIX) QVERIFY(QDir("./.hidden-directory").exists() || QDir().mkdir("./.hidden-directory")); QTest::newRow("/path/to/.hidden-directory") << QDir::currentPath() + QString("/.hidden-directory") << true; QTest::newRow("/path/to/.hidden-directory/.") << QDir::currentPath() + QString("/.hidden-directory/.") << true; @@ -1186,7 +1160,7 @@ void tst_QFileInfo::isHidden_data() #if defined(Q_OS_MAC) // /bin has the hidden attribute on Mac OS X QTest::newRow("/bin/") << QString::fromLatin1("/bin/") << true; -#elif !defined(Q_OS_WIN) && !defined(Q_OS_SYMBIAN) +#elif !defined(Q_OS_WIN) QTest::newRow("/bin/") << QString::fromLatin1("/bin/") << false; #endif @@ -1195,35 +1169,6 @@ void tst_QFileInfo::isHidden_data() QTest::newRow("mac_private_etc") << QString::fromLatin1("/private/etc") << false; QTest::newRow("mac_Applications") << QString::fromLatin1("/Applications") << false; #endif - -#ifdef Q_OS_SYMBIAN - // No guaranteed hidden file knows to exist in Symbian filesystem, so make one. - QString hiddenFileName("hidden.txt"); - QString notHiddenFileName("nothidden.txt"); - QTest::newRow("hidden file") << hiddenFileName << true; - QTest::newRow("non-hidden file") << notHiddenFileName << false; - - { - QFile file(hiddenFileName); - QVERIFY(file.open(QIODevice::WriteOnly)); - QTextStream t(&file); - t << "foobar"; - - QFile file2(notHiddenFileName); - QVERIFY(file2.open(QIODevice::WriteOnly)); - QTextStream t2(&file2); - t2 << "foobar"; - } - - RFs rfs; - TInt err = rfs.Connect(); - QCOMPARE(err, KErrNone); - HBufC* symFile = qt_QString2HBufC(hiddenFileName); - err = rfs.SetAtt(*symFile, KEntryAttHidden, 0); - rfs.Close(); - delete symFile; - QCOMPARE(err, KErrNone); -#endif } void tst_QFileInfo::isHidden() @@ -1508,7 +1453,7 @@ void tst_QFileInfo::isWritable() QVERIFY(fi.exists()); QVERIFY(!fi.isWritable()); #endif -#if defined (Q_OS_UNIX) && !defined (Q_OS_SYMBIAN) +#if defined (Q_OS_UNIX) if (::getuid() == 0) QVERIFY(QFileInfo("/etc/passwd").isWritable()); else @@ -1518,14 +1463,10 @@ void tst_QFileInfo::isWritable() void tst_QFileInfo::isExecutable() { -#ifdef Q_OS_SYMBIAN - QString appPath = "c:/sys/bin/tst_qfileinfo.exe"; -#else QString appPath = QCoreApplication::applicationDirPath(); appPath += "/tst_qfileinfo"; -# if defined(Q_OS_WIN) +#if defined(Q_OS_WIN) appPath += ".exe"; -# endif #endif QFileInfo fi(appPath); QCOMPARE(fi.isExecutable(), true); @@ -1652,7 +1593,7 @@ void tst_QFileInfo::detachingOperations() QVERIFY(!info1.caching()); } -#if !defined(Q_OS_WINCE) && !defined(Q_OS_SYMBIAN) +#if !defined(Q_OS_WINCE) #if defined (Q_OS_WIN) BOOL IsUserAdmin() { @@ -1743,7 +1684,7 @@ void tst_QFileInfo::owner() void tst_QFileInfo::group() { QString expected; -#if defined(Q_OS_UNIX) && !defined(Q_OS_SYMBIAN) +#if defined(Q_OS_UNIX) struct group *gr; gid_t gid = getegid(); gr = getgrgid(gid); diff --git a/tests/auto/corelib/io/qfilesystementry/tst_qfilesystementry.cpp b/tests/auto/corelib/io/qfilesystementry/tst_qfilesystementry.cpp index 2daabee48f..9edd0b215c 100644 --- a/tests/auto/corelib/io/qfilesystementry/tst_qfilesystementry.cpp +++ b/tests/auto/corelib/io/qfilesystementry/tst_qfilesystementry.cpp @@ -42,7 +42,7 @@ #include <QtCore/private/qfilesystementry_p.h> -#if defined(Q_OS_WIN) || defined(Q_OS_SYMBIAN) +#if defined(Q_OS_WIN) # define WIN_STUFF #endif diff --git a/tests/auto/corelib/io/qfilesystemwatcher/tst_qfilesystemwatcher.cpp b/tests/auto/corelib/io/qfilesystemwatcher/tst_qfilesystemwatcher.cpp index 9d46a8d863..3468390257 100644 --- a/tests/auto/corelib/io/qfilesystemwatcher/tst_qfilesystemwatcher.cpp +++ b/tests/auto/corelib/io/qfilesystemwatcher/tst_qfilesystemwatcher.cpp @@ -104,7 +104,7 @@ tst_QFileSystemWatcher::tst_QFileSystemWatcher() if (inotify_init() != -1) do_force_engines << "inotify"; #endif -#elif defined(Q_OS_WIN) || defined(Q_OS_DARWIN) || defined(Q_OS_FREEBSD) || defined(Q_OS_SYMBIAN) +#elif defined(Q_OS_WIN) || defined(Q_OS_DARWIN) || defined(Q_OS_FREEBSD) // we have native engines for win32, macosx and freebsd do_force_engines << "native"; #endif @@ -464,8 +464,6 @@ void tst_QFileSystemWatcher::watchFileAndItsDirectory() //Note that if there are several changes during a short period of time, some //of the changes might not emit this signal. However, the last change in the //sequence of changes will always generate this signal. - //Symbian behaves as documented (and can't be filtered), but the other platforms don't - //so test should not assert this QVERIFY(dirChangedSpy.count() < 2); if (backend == "dnotify") @@ -504,9 +502,7 @@ void tst_QFileSystemWatcher::watchFileAndItsDirectory() timer.start(3000); eventLoop.exec(); QCOMPARE(fileChangedSpy.count(), 0); - // polling watcher has generated separate events for content and time change - // on Symbian emulator, so allow possibility of 2 events - QVERIFY(dirChangedSpy.count() == 1 || dirChangedSpy.count() == 2); + QCOMPARE(dirChangedSpy.count(), 1); QVERIFY(QDir().rmdir("testDir")); } diff --git a/tests/auto/corelib/io/qiodevice/qiodevice.pro b/tests/auto/corelib/io/qiodevice/qiodevice.pro index 08996e8cd4..0d580b824c 100644 --- a/tests/auto/corelib/io/qiodevice/qiodevice.pro +++ b/tests/auto/corelib/io/qiodevice/qiodevice.pro @@ -9,12 +9,6 @@ wince*: { DEPLOYMENT += addFiles DEFINES += SRCDIR=\\\"\\\" !wince50standard-x86-msvc2005: DEFINES += WINCE_EMULATOR_TEST=1 -} else:symbian { - # SRCDIR defined in code in symbian - addFiles.files = tst_qiodevice.cpp - addFiles.path = . - DEPLOYMENT += addFiles - TARGET.CAPABILITY = NetworkServices } else { DEFINES += SRCDIR=\\\"$$PWD/\\\" } diff --git a/tests/auto/corelib/io/qiodevice/tst_qiodevice.cpp b/tests/auto/corelib/io/qiodevice/tst_qiodevice.cpp index 425b3b6bd1..27e1c7d14b 100644 --- a/tests/auto/corelib/io/qiodevice/tst_qiodevice.cpp +++ b/tests/auto/corelib/io/qiodevice/tst_qiodevice.cpp @@ -49,10 +49,6 @@ //TESTED_CLASS= //TESTED_FILES= -#ifdef Q_OS_SYMBIAN -#define SRCDIR "" -#endif - class tst_QIODevice : public QObject { Q_OBJECT @@ -102,7 +98,6 @@ void tst_QIODevice::getSetCheck() tst_QIODevice::tst_QIODevice() { - Q_SET_DEFAULT_IAP } tst_QIODevice::~tst_QIODevice() diff --git a/tests/auto/corelib/io/qprocess/qprocess.pro b/tests/auto/corelib/io/qprocess/qprocess.pro index 77cfc8252e..67c5f5437c 100644 --- a/tests/auto/corelib/io/qprocess/qprocess.pro +++ b/tests/auto/corelib/io/qprocess/qprocess.pro @@ -17,16 +17,11 @@ SUBDIRS = \ testGuiProcess \ testDetached \ fileWriterProcess \ - testSetWorkingDirectory - -!symbian: { -SUBDIRS +=testProcessSpacesArgs/onespace.pro \ + testSetWorkingDirectory \ + testProcessSpacesArgs/onespace.pro \ testProcessSpacesArgs/twospaces.pro \ testSoftExit -} win32:!wince*:SUBDIRS+=testProcessEchoGui SUBDIRS += test - - diff --git a/tests/auto/corelib/io/qprocess/test/test.pro b/tests/auto/corelib/io/qprocess/test/test.pro index a91caddd2f..5581077387 100644 --- a/tests/auto/corelib/io/qprocess/test/test.pro +++ b/tests/auto/corelib/io/qprocess/test/test.pro @@ -18,10 +18,7 @@ win32: { QT = core - -!symbian: { - QT += network -} +QT += network embedded: QT += gui @@ -106,19 +103,3 @@ wince*: { addFile_testSoftExit \ addFile_testSpaceInName } - -symbian: { - binDep.files = \ - fileWriterProcess.exe \ - testDetached.exe \ - testExitCodes.exe \ - testProcessCrash.exe \ - testProcessEcho.exe \ - testProcessNormal.exe \ - testProcessOutput.exe \ - nospace.exe \ - testSpaceInName.exe - binDep.path = \\sys\\bin - - DEPLOYMENT += binDep -} diff --git a/tests/auto/corelib/io/qprocess/testDetached/testDetached.pro b/tests/auto/corelib/io/qprocess/testDetached/testDetached.pro index 80a616b3e9..8d1fcba624 100644 --- a/tests/auto/corelib/io/qprocess/testDetached/testDetached.pro +++ b/tests/auto/corelib/io/qprocess/testDetached/testDetached.pro @@ -4,7 +4,3 @@ CONFIG += console CONFIG -= app_bundle INSTALLS = DESTDIR = ./ - -symbian: { -TARGET.EPOCSTACKSIZE =0x14000 -} diff --git a/tests/auto/corelib/io/qprocess/testProcessOutput/main.cpp b/tests/auto/corelib/io/qprocess/testProcessOutput/main.cpp index b648d1bec3..d01739e3c0 100644 --- a/tests/auto/corelib/io/qprocess/testProcessOutput/main.cpp +++ b/tests/auto/corelib/io/qprocess/testProcessOutput/main.cpp @@ -44,23 +44,13 @@ int main() { -#if defined(__SYMBIAN32__) - // Printing to stdout messes up the out.txt, so open a file and print there. - FILE* file = fopen("c:\\logs\\qprocess_output_test.txt","w+"); - for (int i=0; i<200; i++) { - fprintf(file, "%d -this is a number\n", i); - fflush(file); - } - fclose(file); -#else -# if defined(_WIN32_WCE) +#if defined(_WIN32_WCE) for (int i=0; i<240; i++) { -# else //fprintf Output is very slow on Windows CE/Symbian +#else //fprintf Output is very slow on Windows CE for (int i=0; i<10240; i++) { -# endif +#endif fprintf(stdout, "%d -this is a number\n", i); fflush(stderr); } -#endif return 0; } diff --git a/tests/auto/corelib/io/qprocess/testProcessSpacesArgs/main.cpp b/tests/auto/corelib/io/qprocess/testProcessSpacesArgs/main.cpp index 39a0b3bac1..00944ba160 100644 --- a/tests/auto/corelib/io/qprocess/testProcessSpacesArgs/main.cpp +++ b/tests/auto/corelib/io/qprocess/testProcessSpacesArgs/main.cpp @@ -44,14 +44,9 @@ int main(int argc, char ** argv) { -#if defined(__SYMBIAN32__) || defined(WINCE) || defined(_WIN32_WCE) -# if defined(__SYMBIAN32__) - // Printing to stdout messes up the out.txt, so open a file and print there. - FILE* file = fopen("c:\\logs\\qprocess_args_test.txt","w+"); -# else +#if defined(WINCE) || defined(_WIN32_WCE) // No pipes on this "OS" FILE* file = fopen("\\temp\\qprocess_args_test.txt","w+"); -# endif for (int i = 0; i < argc; ++i) { if (i) fprintf(file, "|"); diff --git a/tests/auto/corelib/io/qprocess/tst_qprocess.cpp b/tests/auto/corelib/io/qprocess/tst_qprocess.cpp index 9873c3e357..73ac067c67 100644 --- a/tests/auto/corelib/io/qprocess/tst_qprocess.cpp +++ b/tests/auto/corelib/io/qprocess/tst_qprocess.cpp @@ -48,10 +48,8 @@ #include <QtCore/QRegExp> #include <QtCore/QDebug> #include <QtCore/QMetaType> -#if !defined(Q_OS_SYMBIAN) // Network test unnecessary? #include <QtNetwork/QHostInfo> -#endif #include <stdlib.h> #ifdef QT_NO_PROCESS @@ -132,7 +130,7 @@ private slots: void waitForBytesWrittenInABytesWrittenSlot(); void spaceArgsTest_data(); void spaceArgsTest(); -#if defined(Q_OS_WIN) || defined(Q_OS_SYMBIAN) +#if defined(Q_OS_WIN) void nativeArguments(); #endif void exitCodeTest(); @@ -208,12 +206,6 @@ tst_QProcess::~tst_QProcess() void tst_QProcess::init() { -#ifdef Q_OS_SYMBIAN - QString dirStr = QString::fromLatin1("c:\\logs"); - QDir dir; - if (!dir.exists(dirStr)) - dir.mkpath(dirStr); -#endif } void tst_QProcess::cleanup() @@ -274,8 +266,6 @@ void tst_QProcess::simpleStart() // Note: This actually seems incorrect, it will only exit the while loop when finishing fails while (process->waitForFinished(5000)) { } -#elif defined(Q_OS_SYMBIAN) - QVERIFY(process->waitForFinished(5000)); #else while (process->waitForReadyRead(5000)) { } @@ -409,9 +399,6 @@ void tst_QProcess::echoTest() #ifdef Q_OS_WINCE QSKIP("Reading and writing to a process is not supported on Qt/CE", SkipAll); #endif -#if defined(Q_OS_SYMBIAN) - QSKIP("Reading and writing to a process is not supported on Qt/Symbian", SkipAll); -#endif QFETCH(QByteArray, input); @@ -470,9 +457,6 @@ void tst_QProcess::echoTest2() #ifdef Q_OS_WINCE QSKIP("Reading and writing to a process is not supported on Qt/CE", SkipAll); #endif -#if defined(Q_OS_SYMBIAN) - QSKIP("Reading and writing to a process is not supported on Qt/Symbian", SkipAll); -#endif process = new QProcess; connect(process, SIGNAL(readyRead()), this, SLOT(exitLoopSlot())); @@ -524,9 +508,6 @@ void tst_QProcess::echoTest_performance() #ifdef Q_OS_WINCE QSKIP("Reading and writing to a process is not supported on Qt/CE", SkipAll); #endif -#if defined(Q_OS_SYMBIAN) - QSKIP("Reading and writing to a process is not supported on Qt/Symbian", SkipAll); -#endif QProcess process; #ifdef Q_OS_MAC @@ -581,9 +562,6 @@ void tst_QProcess::echoTestGui() #ifdef Q_OS_WINCE QSKIP("Reading and writing to a process is not supported on Qt/CE", SkipAll); #endif -#if defined(Q_OS_SYMBIAN) - QSKIP("Reading and writing to a process is not supported on Qt/Symbian", SkipAll); -#endif QProcess process; @@ -614,9 +592,6 @@ void tst_QProcess::batFiles() #if defined(Q_OS_WINCE) QSKIP("Batch files are not supported on Windows CE", SkipAll); #endif -#if defined(Q_OS_SYMBIAN) - QSKIP("Batch files are not supported on Symbian", SkipAll); -#endif QFETCH(QString, batFile); QFETCH(QByteArray, output); @@ -687,9 +662,6 @@ void tst_QProcess::loopBackTest() #ifdef Q_OS_WINCE QSKIP("Reading and writing to a process is not supported on Qt/CE", SkipAll); #endif -#if defined(Q_OS_SYMBIAN) - QSKIP("Reading and writing to a process is not supported on Qt/Symbian", SkipAll); -#endif process = new QProcess; #ifdef Q_OS_MAC @@ -720,9 +692,6 @@ void tst_QProcess::readTimeoutAndThenCrash() #ifdef Q_OS_WINCE QSKIP("Reading and writing to a process is not supported on Qt/CE", SkipAll); #endif -#if defined(Q_OS_SYMBIAN) - QSKIP("Reading and writing to a process is not supported on Qt/Symbian", SkipAll); -#endif process = new QProcess; #ifdef Q_OS_MAC @@ -764,30 +733,18 @@ void tst_QProcess::waitForFinished() process.start("testProcessOutput/testProcessOutput"); #endif -#if !defined(Q_OS_WINCE) && !defined(Q_OS_SYMBIAN) +#if !defined(Q_OS_WINCE) QVERIFY(process.waitForFinished(5000)); #else QVERIFY(process.waitForFinished(30000)); #endif QCOMPARE(process.exitStatus(), QProcess::NormalExit); -#if defined(Q_OS_SYMBIAN) - // Symbian test outputs to a file, so check that - FILE* file = fopen("c:\\logs\\qprocess_output_test.txt","r"); - int retval = 0; - int count = 0; - while((int)(retval = fgetc(file) )!= EOF) - if (retval == '\n') - count++; - fclose(file); - QCOMPARE(count, 200); -#else -# if defined (Q_OS_WINCE) +#if defined (Q_OS_WINCE) QEXPECT_FAIL("", "Reading and writing to a process is not supported on Qt/CE", Continue); -# endif +#endif QString output = process.readAll(); QCOMPARE(output.count("\n"), 10*1024); -#endif process.start("blurdybloop"); QVERIFY(!process.waitForFinished()); @@ -800,9 +757,6 @@ void tst_QProcess::deadWhileReading() #ifdef Q_OS_WINCE QSKIP("Reading and writing to a process is not supported on Qt/CE", SkipAll); #endif -#if defined(Q_OS_SYMBIAN) - QSKIP("Reading and writing to a process is not supported on Qt/Symbian", SkipAll); -#endif QProcess process; @@ -828,9 +782,6 @@ void tst_QProcess::restartProcessDeadlock() #ifdef Q_OS_WINCE QSKIP("Reading and writing to a process is not supported on Qt/CE", SkipAll); #endif -#if defined(Q_OS_SYMBIAN) - QSKIP("Reading and writing to a process is not supported on Qt/Symbian", SkipAll); -#endif // The purpose of this test is to detect whether restarting a // process in the finished() connected slot causes a deadlock @@ -869,9 +820,6 @@ void tst_QProcess::closeWriteChannel() #ifdef Q_OS_WINCE QSKIP("Reading and writing to a process is not supported on Qt/CE", SkipAll); #endif -#if defined(Q_OS_SYMBIAN) - QSKIP("Reading and writing to a process is not supported on Qt/Symbian", SkipAll); -#endif QProcess more; more.start("testProcessEOF/testProcessEOF"); @@ -901,9 +849,6 @@ void tst_QProcess::closeReadChannel() #ifdef Q_OS_WINCE QSKIP("Reading and writing to a process is not supported on Qt/CE", SkipAll); #endif -#if defined(Q_OS_SYMBIAN) - QSKIP("Reading and writing to a process is not supported on Qt/Symbian", SkipAll); -#endif for (int i = 0; i < 10; ++i) { QProcess::ProcessChannel channel1 = QProcess::StandardOutput; @@ -941,9 +886,6 @@ void tst_QProcess::openModes() #ifdef Q_OS_WINCE QSKIP("Reading and writing to a process is not supported on Qt/CE", SkipAll); #endif -#if defined(Q_OS_SYMBIAN) - QSKIP("Reading and writing to a process is not supported on Qt/Symbian", SkipAll); -#endif QProcess proc; QVERIFY(!proc.isOpen()); @@ -994,9 +936,6 @@ void tst_QProcess::emitReadyReadOnlyWhenNewDataArrives() #ifdef Q_OS_WINCE QSKIP("Reading and writing to a process is not supported on Qt/CE", SkipAll); #endif -#if defined(Q_OS_SYMBIAN) - QSKIP("Reading and writing to a process is not supported on Qt/Symbian", SkipAll); -#endif QProcess proc; connect(&proc, SIGNAL(readyRead()), this, SLOT(exitLoopSlot())); @@ -1033,9 +972,6 @@ void tst_QProcess::emitReadyReadOnlyWhenNewDataArrives() //----------------------------------------------------------------------------- void tst_QProcess::hardExit() { -#if defined(Q_OS_SYMBIAN) - QSKIP("Killing started processes is not supported on Qt/Symbian due platform security", SkipAll); -#endif QProcess proc; #if defined(Q_OS_MAC) @@ -1062,9 +998,6 @@ void tst_QProcess::hardExit() //----------------------------------------------------------------------------- void tst_QProcess::softExit() { -#if defined(Q_OS_SYMBIAN) - QSKIP("Terminating started processes is not supported on Qt/Symbian due platform security", SkipAll); -#endif QProcess proc; proc.start("testSoftExit/testSoftExit"); @@ -1169,9 +1102,6 @@ void tst_QProcess::softExitInSlots() #ifdef Q_OS_WINCE QSKIP("Reading and writing to a process is not supported on Qt/CE", SkipAll); #endif -#if defined(Q_OS_SYMBIAN) - QSKIP("Reading and writing to a process is not supported on Qt/Symbian", SkipAll); -#endif QFETCH(QString, appName); @@ -1191,9 +1121,6 @@ void tst_QProcess::mergedChannels() #ifdef Q_OS_WINCE QSKIP("Reading and writing to a process is not supported on Qt/CE", SkipAll); #endif -#if defined(Q_OS_SYMBIAN) - QSKIP("Reading and writing to a process is not supported on Qt/Symbian", SkipAll); -#endif QProcess process; process.setReadChannelMode(QProcess::MergedChannels); @@ -1224,9 +1151,6 @@ void tst_QProcess::forwardedChannels() #ifdef Q_OS_WINCE QSKIP("Reading and writing to a process is not supported on Qt/CE", SkipAll); #endif -#if defined(Q_OS_SYMBIAN) - QSKIP("Reading and writing to a process is not supported on Qt/Symbian", SkipAll); -#endif QProcess process; process.setReadChannelMode(QProcess::ForwardedChannels); @@ -1254,9 +1178,6 @@ void tst_QProcess::atEnd() #ifdef Q_OS_WINCE QSKIP("Reading and writing to a process is not supported on Qt/CE", SkipAll); #endif -#if defined(Q_OS_SYMBIAN) - QSKIP("Reading and writing to a process is not supported on Qt/Symbian", SkipAll); -#endif QProcess process; @@ -1289,10 +1210,6 @@ public: return exitCode; } -#if defined(Q_OS_SYMBIAN) - int serial; -#endif - protected: inline void run() { @@ -1304,21 +1221,11 @@ protected: #ifdef Q_OS_MAC process.start("testProcessEcho/testProcessEcho.app"); -#elif defined(Q_OS_SYMBIAN) && defined(Q_CC_NOKIAX86) - // WINSCW builds in Symbian do not allow multiple processes to load Qt libraries, - // so use just a simple process instead of testDetached. - process.start("testProcessNormal"); -#elif defined(Q_OS_SYMBIAN) - // testDetached used because it does something, but doesn't take too long. - QFile infoFile(QString("c:\\logs\\detinfo%1").arg(serial)); - QStringList args; - args << infoFile.fileName(); - process.start("testDetached", args); #else process.start("testProcessEcho/testProcessEcho"); #endif -#if !defined(Q_OS_WINCE) && !defined(Q_OS_SYMBIAN) +#if !defined(Q_OS_WINCE) QCOMPARE(process.write("abc\0", 4), qint64(4)); #endif exitCode = exec(); @@ -1349,20 +1256,11 @@ void tst_QProcess::processInAThread() //----------------------------------------------------------------------------- void tst_QProcess::processesInMultipleThreads() { -#if defined(Q_OS_SYMBIAN) - int serialCounter = 0; -#endif - for (int i = 0; i < 10; ++i) { TestThread thread1; TestThread thread2; TestThread thread3; -#if defined(Q_OS_SYMBIAN) - thread1.serial = serialCounter++; - thread2.serial = serialCounter++; - thread3.serial = serialCounter++; -#endif thread1.start(); thread2.start(); thread3.start(); @@ -1388,21 +1286,14 @@ void tst_QProcess::waitForFinishedWithTimeout() #ifdef Q_OS_MAC process->start("testProcessEcho/testProcessEcho.app"); -#elif defined(Q_OS_SYMBIAN) - process->start("testProcessOutput"); #else process->start("testProcessEcho/testProcessEcho"); #endif -#if defined(Q_OS_SYMBIAN) - QVERIFY(process->waitForStarted(50)); - QVERIFY(!process->waitForFinished(1)); -#else QVERIFY(process->waitForStarted(5000)); QVERIFY(!process->waitForFinished(1)); process->write("", 1); -#endif QVERIFY(process->waitForFinished()); @@ -1416,9 +1307,6 @@ void tst_QProcess::waitForReadyReadInAReadyReadSlot() #ifdef Q_OS_WINCE QSKIP("Reading and writing to a process is not supported on Qt/CE", SkipAll); #endif -#if defined(Q_OS_SYMBIAN) - QSKIP("Reading and writing to a process is not supported on Qt/Symbian", SkipAll); -#endif process = new QProcess(this); connect(process, SIGNAL(readyRead()), this, SLOT(waitForReadyReadInAReadyReadSlotSlot())); @@ -1452,9 +1340,6 @@ void tst_QProcess::waitForReadyReadInAReadyReadSlotSlot() #ifdef Q_OS_WINCE QSKIP("Reading and writing to a process is not supported on Qt/CE", SkipAll); #endif -#if defined(Q_OS_SYMBIAN) - QSKIP("Reading and writing to a process is not supported on Qt/Symbian", SkipAll); -#endif bytesAvailable = process->bytesAvailable(); process->write("bar", 4); @@ -1468,9 +1353,6 @@ void tst_QProcess::waitForBytesWrittenInABytesWrittenSlot() #ifdef Q_OS_WINCE QSKIP("Reading and writing to a process is not supported on Qt/CE", SkipAll); #endif -#if defined(Q_OS_SYMBIAN) - QSKIP("Reading and writing to a process is not supported on Qt/Symbian", SkipAll); -#endif process = new QProcess(this); connect(process, SIGNAL(bytesWritten(qint64)), this, SLOT(waitForBytesWrittenInABytesWrittenSlotSlot())); @@ -1503,9 +1385,6 @@ void tst_QProcess::waitForBytesWrittenInABytesWrittenSlotSlot() #ifdef Q_OS_WINCE QSKIP("Reading and writing to a process is not supported on Qt/CE", SkipAll); #endif -#if defined(Q_OS_SYMBIAN) - QSKIP("Reading and writing to a process is not supported on Qt/Symbian", SkipAll); -#endif process->write("b"); QVERIFY(process->waitForBytesWritten(5000)); @@ -1564,12 +1443,8 @@ void tst_QProcess::spaceArgsTest() QStringList programs; programs << QString::fromLatin1("testProcessSpacesArgs/nospace") -#if defined(Q_OS_SYMBIAN) - ; // Symbian toolchain doesn't like exes with spaces in the name -#else << QString::fromLatin1("testProcessSpacesArgs/one space") << QString::fromLatin1("testProcessSpacesArgs/two space s"); -#endif process = new QProcess(this); @@ -1577,7 +1452,7 @@ void tst_QProcess::spaceArgsTest() QString program = programs.at(i); process->start(program, args); -#if !defined(Q_OS_WINCE) && !defined(Q_OS_SYMBIAN) +#if !defined(Q_OS_WINCE) QVERIFY(process->waitForStarted(5000)); QVERIFY(process->waitForFinished(5000)); #else @@ -1585,15 +1460,7 @@ void tst_QProcess::spaceArgsTest() QVERIFY(process->waitForFinished(10000)); #endif -#if defined(Q_OS_SYMBIAN) - // Symbian test outputs to a file, so check that - FILE* file = fopen("c:\\logs\\qprocess_args_test.txt","r"); - QVERIFY(file); - char buf[256]; - fgets(buf, 256, file); - fclose(file); - QStringList actual = QString::fromLatin1(buf).split("|"); -#elif !defined(Q_OS_WINCE) +#if !defined(Q_OS_WINCE) QStringList actual = QString::fromLatin1(process->readAll()).split("|"); #endif #if !defined(Q_OS_WINCE) @@ -1615,14 +1482,7 @@ void tst_QProcess::spaceArgsTest() QVERIFY(process->waitForStarted(5000)); QVERIFY(process->waitForFinished(5000)); -#if defined(Q_OS_SYMBIAN) - // Symbian test outputs to a file, so check that - file = fopen("c:\\logs\\qprocess_args_test.txt","r"); - QVERIFY(file); - fgets(buf, 256, file); - fclose(file); - actual = QString::fromLatin1(buf).split("|"); -#elif !defined(Q_OS_WINCE) +#if !defined(Q_OS_WINCE) actual = QString::fromLatin1(process->readAll()).split("|"); #endif #if !defined(Q_OS_WINCE) @@ -1638,7 +1498,7 @@ void tst_QProcess::spaceArgsTest() process = 0; } -#if defined(Q_OS_WIN) || defined(Q_OS_SYMBIAN) +#if defined(Q_OS_WIN) //----------------------------------------------------------------------------- void tst_QProcess::nativeArguments() @@ -1651,7 +1511,7 @@ void tst_QProcess::nativeArguments() proc.start(QString::fromLatin1("testProcessSpacesArgs/nospace"), QStringList()); -#if !defined(Q_OS_WINCE) && !defined(Q_OS_SYMBIAN) +#if !defined(Q_OS_WINCE) QVERIFY(proc.waitForStarted(5000)); QVERIFY(proc.waitForFinished(5000)); #else @@ -1659,13 +1519,9 @@ void tst_QProcess::nativeArguments() QVERIFY(proc.waitForFinished(10000)); #endif -#if defined(Q_OS_SYMBIAN) || defined(Q_OS_WINCE) - // Symbian test outputs to a file, so check that -# ifdef Q_OS_SYMBIAN - FILE* file = fopen("c:\\logs\\qprocess_args_test.txt","r"); -# else +#if defined(Q_OS_WINCE) + // WinCE test outputs to a file, so check that FILE* file = fopen("\\temp\\qprocess_args_test.txt","r"); -# endif QVERIFY(file); char buf[256]; fgets(buf, 256, file); @@ -1691,13 +1547,7 @@ void tst_QProcess::nativeArguments() //----------------------------------------------------------------------------- void tst_QProcess::exitCodeTest() { -#if defined(Q_OS_SYMBIAN) - // Kernel will run out of process handles on some hw, as there is some - // delay before they are recycled, so limit the amount of processes. - for (int i = 0; i < 50; ++i) { -#else for (int i = 0; i < 255; ++i) { -#endif QProcess process; process.start("testExitCodes/testExitCodes " + QString::number(i)); QVERIFY(process.waitForFinished(5000)); @@ -1825,9 +1675,6 @@ void tst_QProcess::removeFileWhileProcessIsRunning() #ifdef Q_OS_WINCE QSKIP("Reading and writing to a process is not supported on Qt/CE", SkipAll); #endif -#if defined(Q_OS_SYMBIAN) - QSKIP("Reading and writing to a process is not supported on Qt/Symbian", SkipAll); -#endif QFile file("removeFile.txt"); QVERIFY(file.open(QFile::WriteOnly)); @@ -1867,7 +1714,7 @@ void tst_QProcess::setEnvironment_data() void tst_QProcess::setEnvironment() { -#if defined (Q_OS_WINCE) || defined(Q_OS_SYMBIAN) +#if defined (Q_OS_WINCE) QSKIP("OS doesn't support environment variables", SkipAll); #endif @@ -1935,7 +1782,7 @@ void tst_QProcess::setProcessEnvironment_data() void tst_QProcess::setProcessEnvironment() { -#if defined (Q_OS_WINCE) || defined(Q_OS_SYMBIAN) +#if defined (Q_OS_WINCE) QSKIP("OS doesn't support environment variables", SkipAll); #endif @@ -1972,7 +1819,7 @@ void tst_QProcess::setProcessEnvironment() //----------------------------------------------------------------------------- void tst_QProcess::systemEnvironment() { -#if defined (Q_OS_WINCE) || defined(Q_OS_SYMBIAN) +#if defined (Q_OS_WINCE) // there is no concept of system variables on Windows CE as there is no console QVERIFY(QProcess::systemEnvironment().isEmpty()); QVERIFY(QProcessEnvironment::systemEnvironment().isEmpty()); @@ -1991,9 +1838,6 @@ void tst_QProcess::spaceInName() #ifdef Q_OS_WINCE QSKIP("Reading and writing to a process is not supported on Qt/CE", SkipAll); #endif -#if defined(Q_OS_SYMBIAN) - QSKIP("Reading and writing to a process is not supported on Qt/Symbian", SkipAll); -#endif QProcess process; process.start("test Space In Name/testSpaceInName", QStringList()); QVERIFY(process.waitForStarted()); @@ -2004,7 +1848,6 @@ void tst_QProcess::spaceInName() //----------------------------------------------------------------------------- void tst_QProcess::lockupsInStartDetached() { -#if !defined(Q_OS_SYMBIAN) // Check that QProcess doesn't cause a lock up at this program's // exit if a thread was started and we tried to run a program that // doesn't exist. Before Qt 4.2, this used to lock up on Unix due @@ -2013,7 +1856,6 @@ void tst_QProcess::lockupsInStartDetached() QHostInfo::lookupHost(QString("something.invalid"), 0, 0); QProcess::execute("yjhbrty"); QProcess::startDetached("yjhbrty"); -#endif } //----------------------------------------------------------------------------- @@ -2022,9 +1864,6 @@ void tst_QProcess::atEnd2() #ifdef Q_OS_WINCE QSKIP("Reading and writing to a process is not supported on Qt/CE", SkipAll); #endif -#if defined(Q_OS_SYMBIAN) - QSKIP("Reading and writing to a process is not supported on Qt/Symbian", SkipAll); -#endif QProcess process; @@ -2070,9 +1909,6 @@ void tst_QProcess::setStandardInputFile() #ifdef Q_OS_WINCE QSKIP("Reading and writing to a process is not supported on Qt/CE", SkipAll); #endif -#if defined(Q_OS_SYMBIAN) - QSKIP("Reading and writing to a process is not supported on Qt/Symbian", SkipAll); -#endif static const char data[] = "A bunch\1of\2data\3\4\5\6\7..."; QProcess process; @@ -2129,9 +1965,6 @@ void tst_QProcess::setStandardOutputFile() #ifdef Q_OS_WINCE QSKIP("Reading and writing to a process is not supported on Qt/CE", SkipAll); #endif -#if defined(Q_OS_SYMBIAN) - QSKIP("Reading and writing to a process is not supported on Qt/Symbian", SkipAll); -#endif static const char data[] = "Original data. "; static const char testdata[] = "Test data."; @@ -2197,9 +2030,6 @@ void tst_QProcess::setStandardOutputProcess() #ifdef Q_OS_WINCE QSKIP("Reading and writing to a process is not supported on Qt/CE", SkipAll); #endif -#if defined(Q_OS_SYMBIAN) - QSKIP("Reading and writing to a process is not supported on Qt/Symbian", SkipAll); -#endif QProcess source; QProcess sink; @@ -2235,9 +2065,6 @@ void tst_QProcess::fileWriterProcess() #ifdef Q_OS_WINCE QSKIP("Reading and writing to a process is not supported on Qt/CE", SkipAll); #endif -#if defined(Q_OS_SYMBIAN) - QSKIP("Reading and writing to a process is not supported on Qt/Symbian", SkipAll); -#endif QString stdinStr; for (int i = 0; i < 5000; ++i) @@ -2264,30 +2091,18 @@ void tst_QProcess::fileWriterProcess() //----------------------------------------------------------------------------- void tst_QProcess::detachedWorkingDirectoryAndPid() { -#if defined(Q_OS_SYMBIAN) && defined(Q_CC_NOKIAX86) - // WINSCW builds in Symbian do not allow multiple processes to load Qt libraries, - // so this test must be skipped. - QSKIP("Multiple processes loading Qt are not allowed in Qt/Symbian emulator.", SkipAll); -#endif qint64 pid; #ifdef Q_OS_WINCE QTest::qSleep(1000); #endif -#if defined(Q_OS_SYMBIAN) - // Symbian has no working directory support, so use logs dir as a shared directory - QFile infoFile(QLatin1String("c:\\logs\\detachedinfo.txt")); -#else QFile infoFile(QDir::currentPath() + QLatin1String("/detachedinfo.txt")); -#endif infoFile.remove(); QString workingDir = QDir::currentPath() + "/testDetached"; -#ifndef Q_OS_SYMBIAN QVERIFY(QFile::exists(workingDir)); -#endif QStringList args; args << infoFile.fileName(); @@ -2313,9 +2128,6 @@ void tst_QProcess::detachedWorkingDirectoryAndPid() qint64 actualPid = processIdString.toLongLong(&ok); QVERIFY(ok); -#if defined(Q_OS_SYMBIAN) - QEXPECT_FAIL("", "Working directory is not supported on Qt/symbian", Continue); -#endif QCOMPARE(actualWorkingDir, workingDir); QCOMPARE(actualPid, pid); } @@ -2326,9 +2138,6 @@ void tst_QProcess::switchReadChannels() #ifdef Q_OS_WINCE QSKIP("Reading and writing to a process is not supported on Qt/CE", SkipAll); #endif -#if defined(Q_OS_SYMBIAN) - QSKIP("Reading and writing to a process is not supported on Qt/Symbian", SkipAll); -#endif const char data[] = "ABCD"; QProcess process; @@ -2364,9 +2173,6 @@ void tst_QProcess::setWorkingDirectory() #ifdef Q_OS_WINCE QSKIP("Windows CE does not support working directory logic", SkipAll); #endif -#if defined(Q_OS_SYMBIAN) - QSKIP("Symbian does not support working directory logic", SkipAll); -#endif process = new QProcess; process->setWorkingDirectory("test"); #ifdef Q_OS_MAC @@ -2399,23 +2205,13 @@ void tst_QProcess::startFinishStartFinish() #else process.start("testProcessOutput/testProcessOutput"); #endif -#if !defined(Q_OS_WINCE) && !defined(Q_OS_SYMBIAN) +#if !defined(Q_OS_WINCE) QVERIFY(process.waitForReadyRead(10000)); QCOMPARE(QString::fromLatin1(process.readLine().trimmed()), QString("0 -this is a number")); #endif if (process.state() != QProcess::NotRunning) QVERIFY(process.waitForFinished(10000)); -#if defined(Q_OS_SYMBIAN) - // Symbian test outputs to a file, so check that - FILE* file = fopen("c:\\logs\\qprocess_output_test.txt","r"); - QVERIFY(file); - char buf[30]; - fgets(buf, 30, file); - QCOMPARE(QString::fromLatin1(buf), - QString("0 -this is a number\n")); - fclose(file); -#endif } } diff --git a/tests/auto/corelib/io/qresourceengine/qresourceengine.pro b/tests/auto/corelib/io/qresourceengine/qresourceengine.pro index abbf39bd83..09509ecf08 100644 --- a/tests/auto/corelib/io/qresourceengine/qresourceengine.pro +++ b/tests/auto/corelib/io/qresourceengine/qresourceengine.pro @@ -9,18 +9,14 @@ load(resources) SOURCES += tst_qresourceengine.cpp RESOURCES += testqrc/test.qrc -symbian-sbsv2 { - runtime_resource.target = $$PWD/runtime_resource.rcc -} else { - runtime_resource.target = runtime_resource.rcc -} +runtime_resource.target = runtime_resource.rcc runtime_resource.depends = $$PWD/testqrc/test.qrc runtime_resource.commands = $$QMAKE_RCC -root /runtime_resource/ -binary $${runtime_resource.depends} -o $${runtime_resource.target} QMAKE_EXTRA_TARGETS = runtime_resource PRE_TARGETDEPS += $${runtime_resource.target} QT = core -wince*|symbian:{ +wince* { deploy.files += runtime_resource.rcc parentdir.txt test.files = testqrc/* test.path = testqrc @@ -39,7 +35,7 @@ wince*|symbian:{ testsub2.files = testqrc/test/test/* testsub2.path = testqrc/test/test DEPLOYMENT += deploy test alias other search1 search2 sub testsub testsub2 - !symbian:DEFINES += SRCDIR=\\\"\\\" + DEFINES += SRCDIR=\\\"\\\" } else { DEFINES += SRCDIR=\\\"$$PWD/\\\" } diff --git a/tests/auto/corelib/io/qresourceengine/tst_qresourceengine.cpp b/tests/auto/corelib/io/qresourceengine/tst_qresourceengine.cpp index 7914fc8bfc..1f8ae1fac1 100644 --- a/tests/auto/corelib/io/qresourceengine/tst_qresourceengine.cpp +++ b/tests/auto/corelib/io/qresourceengine/tst_qresourceengine.cpp @@ -43,10 +43,6 @@ #include <QtTest/QtTest> #include <QtCore> -#ifdef Q_OS_SYMBIAN -#define SRCDIR "." -#endif - class tst_QResourceEngine: public QObject { Q_OBJECT diff --git a/tests/auto/corelib/io/qsettings/tst_qsettings.cpp b/tests/auto/corelib/io/qsettings/tst_qsettings.cpp index e3b96e82bb..301f40b152 100644 --- a/tests/auto/corelib/io/qsettings/tst_qsettings.cpp +++ b/tests/auto/corelib/io/qsettings/tst_qsettings.cpp @@ -53,9 +53,7 @@ #include <QtGui/QKeySequence> #include "../../../../shared/util.h" -#if !defined(Q_OS_SYMBIAN) -# include <cctype> -#endif +#include <cctype> #if defined(Q_OS_WIN) && defined(Q_CC_GNU) // need for unlink on mingw #include <io.h> @@ -128,7 +126,7 @@ private slots: void setPath(); void setDefaultFormat(); void dontCreateNeedlessPaths(); -#if !defined(Q_OS_WIN) && !defined(Q_OS_SYMBIAN) +#if !defined(Q_OS_WIN) void dontReorderIniKeysNeedlessly(); #endif #if defined(Q_OS_WIN) @@ -177,7 +175,7 @@ void tst_QSettings::getSetCheck() Q_DECLARE_METATYPE(QSettings::Format) -#if defined(Q_OS_WINCE) || defined(Q_OS_SYMBIAN) +#if defined(Q_OS_WINCE) static void removePath(const QString& _path) { QString path = _path; @@ -324,11 +322,9 @@ void tst_QSettings::init() QSettings(QSettings::SystemScope, "software.org").clear(); QSettings(QSettings::UserScope, "other.software.org").clear(); QSettings(QSettings::SystemScope, "other.software.org").clear(); -#elif defined(Q_OS_SYMBIAN) - removePath(settingsPath()); #endif -#if !defined(Q_OS_WIN) && !defined(Q_OS_SYMBIAN) +#if !defined(Q_OS_WIN) system(QString("chmod -R u+rw %1 2> /dev/null").arg(settingsPath()).toLatin1()); system(QString("rm -fr %1 2> /dev/null").arg(settingsPath()).toLatin1()); #endif @@ -510,13 +506,13 @@ void tst_QSettings::ctor() */ QSettings settings5(format, QSettings::UserScope, "SoftWare.ORG", "killerApp"); if (format == QSettings::NativeFormat) { -#if defined(Q_OS_WIN) || defined(Q_OS_DARWIN) || defined(Q_OS_SYMBIAN) +#if defined(Q_OS_WIN) || defined(Q_OS_DARWIN) QCOMPARE(settings5.value("key 1").toString(), QString("gurgle")); #else QVERIFY(!settings5.contains("key 1")); #endif } else { -#if defined(Q_OS_WIN) || defined(Q_OS_DARWIN) || defined(Q_OS_SYMBIAN) +#if defined(Q_OS_WIN) || defined(Q_OS_DARWIN) QCOMPARE(settings5.value("key 1").toString(), QString("gurgle")); #else QVERIFY(!settings5.contains("key 1")); @@ -686,8 +682,6 @@ void tst_QSettings::testErrorHandling() #ifdef QT_BUILD_INTERNAL #ifdef Q_OS_WIN QSKIP("Windows doesn't support most file modes, including read-only directories, so this test is moot.", SkipAll); -#elif defined(Q_OS_SYMBIAN) - QSKIP("Symbian/Open C doesn't support execute or write only file modes, or directory permissions, so this test is mostly moot.", SkipAll); #elif defined(Q_OS_UNIX) if (::getuid() == 0) QSKIP("Running this test as root doesn't work, since file perms do not bother him", SkipAll); @@ -1471,7 +1465,7 @@ void tst_QSettings::sync() // Now "some other app" will change other.software.org.ini QString userConfDir = settingsPath("__user__") + QDir::separator(); -#if !defined(Q_OS_WINCE) && !defined(Q_OS_SYMBIAN) +#if !defined(Q_OS_WINCE) unlink((userConfDir + "other.software.org.ini").toLatin1()); rename((userConfDir + "software.org.ini").toLatin1(), (userConfDir + "other.software.org.ini").toLatin1()); @@ -3005,7 +2999,7 @@ void tst_QSettings::dontCreateNeedlessPaths() QVERIFY(!fileInfo.dir().exists()); } -#if !defined(Q_OS_WIN) && !defined(Q_OS_SYMBIAN) +#if !defined(Q_OS_WIN) void tst_QSettings::dontReorderIniKeysNeedlessly() { #ifdef QT_QSETTINGS_ALWAYS_CASE_SENSITIVE_AND_FORGET_ORIGINAL_KEY_ORDER diff --git a/tests/auto/corelib/io/qtemporaryfile/qtemporaryfile.pro b/tests/auto/corelib/io/qtemporaryfile/qtemporaryfile.pro index 64a043b19a..dda224ca78 100644 --- a/tests/auto/corelib/io/qtemporaryfile/qtemporaryfile.pro +++ b/tests/auto/corelib/io/qtemporaryfile/qtemporaryfile.pro @@ -2,13 +2,6 @@ load(qttest_p4) SOURCES += tst_qtemporaryfile.cpp QT = core - -symbian { - testData.files = tst_qtemporaryfile.cpp - testData.path = . - DEPLOYMENT += testData -}else { - DEFINES += SRCDIR=\\\"$$PWD/\\\" -} +DEFINES += SRCDIR=\\\"$$PWD/\\\" CONFIG += parallel_test diff --git a/tests/auto/corelib/io/qtemporaryfile/tst_qtemporaryfile.cpp b/tests/auto/corelib/io/qtemporaryfile/tst_qtemporaryfile.cpp index 75b3b50d14..916393eee7 100644 --- a/tests/auto/corelib/io/qtemporaryfile/tst_qtemporaryfile.cpp +++ b/tests/auto/corelib/io/qtemporaryfile/tst_qtemporaryfile.cpp @@ -59,10 +59,6 @@ # include <unistd.h> // close(2) #endif -#ifdef Q_OS_SYMBIAN -#define SRCDIR "" -#endif - //TESTED_CLASS= //TESTED_FILES= @@ -227,7 +223,7 @@ void tst_QTemporaryFile::fileName() QVERIFY(QFile::exists(fileName)); // Get path to the temp file, without the file name. QString absoluteFilePath = QFileInfo(fileName).absolutePath(); -#if defined(Q_OS_WIN) || defined(Q_OS_SYMBIAN) +#if defined(Q_OS_WIN) absoluteFilePath = absoluteFilePath.toLower(); absoluteTempPath = absoluteTempPath.toLower(); #endif @@ -398,7 +394,7 @@ void tst_QTemporaryFile::openOnRootDrives() void tst_QTemporaryFile::stressTest() { -#if defined(Q_OS_WINCE) || defined(Q_OS_SYMBIAN) +#if defined(Q_OS_WINCE) // 200 is still ok, first colision happens after ~30 const int iterations = 200; #else diff --git a/tests/auto/corelib/io/qtextstream/qtextstream.pro b/tests/auto/corelib/io/qtextstream/qtextstream.pro index a2dcc8108d..19853b74ad 100644 --- a/tests/auto/corelib/io/qtextstream/qtextstream.pro +++ b/tests/auto/corelib/io/qtextstream/qtextstream.pro @@ -1,6 +1,2 @@ TEMPLATE = subdirs -SUBDIRS = test -!symbian: SUBDIRS += stdinProcess readAllStdinProcess readLineStdinProcess - - - +SUBDIRS = test stdinProcess readAllStdinProcess readLineStdinProcess diff --git a/tests/auto/corelib/io/qtextstream/test/test.pro b/tests/auto/corelib/io/qtextstream/test/test.pro index e0eb4ef193..79252b2c5f 100644 --- a/tests/auto/corelib/io/qtextstream/test/test.pro +++ b/tests/auto/corelib/io/qtextstream/test/test.pro @@ -15,26 +15,13 @@ RESOURCES += ../qtextstream.qrc QT = core network - -wince*|symbian: { - addFiles.files = ../rfc3261.txt ../shift-jis.txt ../task113817.txt ../qtextstream.qrc ../tst_qtextstream.cpp - addFiles.path = . - res.files = ../resources - res.path = . - DEPLOYMENT += addFiles -} - -wince*: { +wince* { + addFiles.files = ../rfc3261.txt ../shift-jis.txt ../task113817.txt ../qtextstream.qrc ../tst_qtextstream.cpp + addFiles.path = . + res.files = ../resources + res.path = . + DEPLOYMENT += addFiles DEFINES += SRCDIR=\\\"\\\" -}else:symbian { - # Symbian can't define SRCDIR meaningfully here - qt_not_deployed { - codecs_plugins.files = qcncodecs.dll qjpcodecs.dll qtwcodecs.dll qkrcodecs.dll - codecs_plugins.path = $$QT_PLUGINS_BASE_DIR/codecs - DEPLOYMENT += codecs_plugins - } -}else { +} else { DEFINES += SRCDIR=\\\"$$PWD/../\\\" } - - diff --git a/tests/auto/corelib/io/qtextstream/tst_qtextstream.cpp b/tests/auto/corelib/io/qtextstream/tst_qtextstream.cpp index 848f813d1e..1348e6d6c7 100644 --- a/tests/auto/corelib/io/qtextstream/tst_qtextstream.cpp +++ b/tests/auto/corelib/io/qtextstream/tst_qtextstream.cpp @@ -76,10 +76,6 @@ QT_END_NAMESPACE //TESTED_CLASS= //TESTED_FILES= -#ifdef Q_OS_SYMBIAN -#define SRCDIR "" -#endif - class tst_QTextStream : public QObject { Q_OBJECT @@ -378,7 +374,6 @@ void tst_QTextStream::getSetCheck() tst_QTextStream::tst_QTextStream() { - Q_SET_DEFAULT_IAP } tst_QTextStream::~tst_QTextStream() @@ -1126,13 +1121,7 @@ void tst_QTextStream::stillOpenWhenAtEnd() #endif QTcpSocket socket; socket.connectToHost(QtNetworkSettings::serverName(), 143); -#if defined(Q_OS_SYMBIAN) - // This number is determined in an arbitrary way; whatever it takes - // to make the test pass. - QVERIFY(socket.waitForReadyRead(30000)); -#else QVERIFY(socket.waitForReadyRead(5000)); -#endif QTextStream stream2(&socket); while (!stream2.readLine().isNull()) {} @@ -1410,8 +1399,8 @@ void tst_QTextStream::pos3LargeFile() // ------------------------------------------------------------------------------ void tst_QTextStream::readStdin() { -#if defined(Q_OS_WINCE) || defined(Q_OS_SYMBIAN) - QSKIP("Qt/CE and Symbian have no stdin/out support for processes", SkipAll); +#if defined(Q_OS_WINCE) + QSKIP("Qt/CE has no stdin/out support for processes", SkipAll); #endif QProcess stdinProcess; stdinProcess.start("stdinProcess/stdinProcess"); @@ -1436,8 +1425,8 @@ void tst_QTextStream::readStdin() // ------------------------------------------------------------------------------ void tst_QTextStream::readAllFromStdin() { -#if defined(Q_OS_WINCE) || defined(Q_OS_SYMBIAN) - QSKIP("Qt/CE and Symbian have no stdin/out support for processes", SkipAll); +#if defined(Q_OS_WINCE) + QSKIP("Qt/CE has no stdin/out support for processes", SkipAll); #endif QProcess stdinProcess; stdinProcess.start("readAllStdinProcess/readAllStdinProcess", QIODevice::ReadWrite | QIODevice::Text); @@ -1457,8 +1446,8 @@ void tst_QTextStream::readAllFromStdin() // ------------------------------------------------------------------------------ void tst_QTextStream::readLineFromStdin() { -#if defined(Q_OS_WINCE) || defined(Q_OS_SYMBIAN) - QSKIP("Qt/CE and Symbian have no stdin/out support for processes", SkipAll); +#if defined(Q_OS_WINCE) + QSKIP("Qt/CE has no stdin/out support for processes", SkipAll); #endif QProcess stdinProcess; stdinProcess.start("readLineStdinProcess/readLineStdinProcess", QIODevice::ReadWrite | QIODevice::Text); @@ -2899,7 +2888,7 @@ void tst_QTextStream::int_write_with_locale() // ------------------------------------------------------------------------------ // like QTEST_APPLESS_MAIN, but initialising the locale on Unix -#if defined (Q_OS_UNIX) && !defined (Q_OS_SYMBIAN) +#if defined (Q_OS_UNIX) QT_BEGIN_NAMESPACE extern bool qt_locale_initialized; QT_END_NAMESPACE @@ -2907,7 +2896,7 @@ QT_END_NAMESPACE int main(int argc, char *argv[]) { -#if defined (Q_OS_UNIX) && !defined (Q_OS_SYMBIAN) +#if defined (Q_OS_UNIX) ::setlocale(LC_ALL, ""); qt_locale_initialized = true; #endif diff --git a/tests/auto/corelib/io/qurl/qurl.pro b/tests/auto/corelib/io/qurl/qurl.pro index a43a57e002..e6976e3c21 100644 --- a/tests/auto/corelib/io/qurl/qurl.pro +++ b/tests/auto/corelib/io/qurl/qurl.pro @@ -1,5 +1,4 @@ load(qttest_p4) SOURCES += tst_qurl.cpp QT = core core-private -symbian: TARGET.CAPABILITY = NetworkServices CONFIG += parallel_test |