summaryrefslogtreecommitdiffstats
path: root/tests/auto/corelib/io
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@nokia.com>2011-09-29 09:39:33 +0200
committerQt by Nokia <qt-info@nokia.com>2011-10-03 07:57:41 +0200
commitf18b690cca2de6c75e70a2fd5871edf9fa993a5e (patch)
tree7884c18b46777aa0af313f4a1ee0993f82ba1152 /tests/auto/corelib/io
parentc3d9d3698674a2240aa97403e3b684894d6f19db (diff)
Tests: Fix compilation on Windows.
Replace Q_WS_... by Q_OS_... in corelib tests. Change-Id: I14c41dca1ec490b3c49ba2c24e60def14c6de9da Reviewed-on: http://codereview.qt-project.org/5778 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Diffstat (limited to 'tests/auto/corelib/io')
-rw-r--r--tests/auto/corelib/io/qdir/tst_qdir.cpp14
-rw-r--r--tests/auto/corelib/io/qfile/tst_qfile.cpp14
-rw-r--r--tests/auto/corelib/io/qprocessenvironment/tst_qprocessenvironment.cpp4
3 files changed, 16 insertions, 16 deletions
diff --git a/tests/auto/corelib/io/qdir/tst_qdir.cpp b/tests/auto/corelib/io/qdir/tst_qdir.cpp
index 7696c8b114..d61e4316c5 100644
--- a/tests/auto/corelib/io/qdir/tst_qdir.cpp
+++ b/tests/auto/corelib/io/qdir/tst_qdir.cpp
@@ -232,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))
+#if (defined(Q_OS_WIN) && !defined(Q_OS_WINCE))
QTest::newRow("data1") << QString("c:/") << QDir::currentPath();
#endif
}
@@ -387,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))
+#if (defined(Q_OS_WIN) && !defined(Q_OS_WINCE))
QTest::newRow("data1") << "C:/sOmedir" << false;
#endif
QTest::newRow("data2") << "somedir" << true;
@@ -615,7 +615,7 @@ void tst_QDir::entryList()
#endif
#endif //Q_NO_SYMLINKS
-#ifdef Q_WS_MAC
+#ifdef Q_OS_MAC
if (qstrcmp(QTest::currentDataTag(), "unprintablenames") == 0)
QSKIP("p4 doesn't sync the files with the unprintable names properly on Mac",SkipSingle);
#endif
@@ -750,7 +750,7 @@ void tst_QDir::canonicalPath_data()
else
appPath.chop(1); // remove the ending slash
-#if defined Q_WS_WIN
+#if defined Q_OS_WIN
if (appPath.endsWith("release", Qt::CaseInsensitive) || appPath.endsWith("debug", Qt::CaseInsensitive)) {
QDir appDir(appPath);
QVERIFY(appDir.cdUp());
@@ -761,7 +761,7 @@ void tst_QDir::canonicalPath_data()
QTest::newRow("relative") << "." << appPath;
QTest::newRow("relativeSubDir") << "./testData/../testData" << appPath + "/testData";
-#ifndef Q_WS_WIN
+#ifndef Q_OS_WIN
QTest::newRow("absPath") << appPath + "/testData/../testData" << appPath + "/testData";
#else
QTest::newRow("absPath") << appPath + "\\testData\\..\\testData" << appPath + "/testData";
@@ -824,7 +824,7 @@ void tst_QDir::current_data()
appPath = QCoreApplication::instance()->applicationDirPath();
else
appPath.chop(1); // remove the ending slash
-#if defined Q_WS_WIN
+#if defined Q_OS_WIN
if (appPath.endsWith("release", Qt::CaseInsensitive))
appPath = appPath.left(appPath.length()-8);
else if (appPath.endsWith("debug", Qt::CaseInsensitive))
@@ -833,7 +833,7 @@ void tst_QDir::current_data()
QTest::newRow("startup") << QString() << appPath;
QTest::newRow("relPath") << "testData" << appPath + "/testData";
-#ifndef Q_WS_WIN
+#ifndef Q_OS_WIN
QTest::newRow("absPath") << appPath + "/testData" << appPath + "/testData";
#else
QTest::newRow("absPath") << appPath + "\\testData" << appPath + "/testData";
diff --git a/tests/auto/corelib/io/qfile/tst_qfile.cpp b/tests/auto/corelib/io/qfile/tst_qfile.cpp
index c245661b14..9f8a8f7c6a 100644
--- a/tests/auto/corelib/io/qfile/tst_qfile.cpp
+++ b/tests/auto/corelib/io/qfile/tst_qfile.cpp
@@ -576,7 +576,7 @@ void tst_QFile::size()
QFETCH( QString, filename );
QFETCH( qint64, size );
-#ifdef Q_WS_WINCE
+#ifdef Q_OS_WINCE
filename = QFileInfo(filename).absoluteFilePath();
#endif
@@ -600,7 +600,7 @@ void tst_QFile::size()
}
{
-#ifdef Q_WS_WINCE
+#ifdef Q_OS_WINCE
QSKIP("Currently low level file I/O not well supported on Windows CE", SkipSingle);
#endif
QFile f;
@@ -1042,7 +1042,7 @@ void tst_QFile::ungetChar()
void tst_QFile::invalidFile_data()
{
QTest::addColumn<QString>("fileName");
-#if !defined(Q_WS_WIN)
+#if !defined(Q_OS_WIN)
QTest::newRow( "x11" ) << QString( "qwe//" );
#else
QTest::newRow( "colon1" ) << QString( "fail:invalid" );
@@ -1225,7 +1225,7 @@ void tst_QFile::copyFallback()
QVERIFY(QFile::exists("file-copy-destination.txt"));
QVERIFY(!file.isOpen());
-#ifdef Q_WS_WINCE
+#ifdef Q_OS_WINCE
// Need to reset permissions on Windows to be able to delete
QVERIFY(QFile::setPermissions("file-copy-destination.txt",
QFile::WriteOther));
@@ -1801,7 +1801,7 @@ void tst_QFile::largeFileSupport()
sizeNeeded *= 2;
sizeNeeded += 1024;
qlonglong freespace = qlonglong(0);
-#ifdef Q_WS_WIN
+#ifdef Q_OS_WIN
_ULARGE_INTEGER free;
if (::GetDiskFreeSpaceEx((wchar_t*)QDir::currentPath().utf16(), &free, 0, 0))
freespace = free.QuadPart;
@@ -2793,7 +2793,7 @@ void tst_QFile::map()
QString fileName = QDir::currentPath() + '/' + "qfile_map_testfile";
-#ifdef Q_WS_WINCE
+#ifdef Q_OS_WINCE
fileName = QFileInfo(fileName).absoluteFilePath();
#endif
@@ -2994,7 +2994,7 @@ void tst_QFile::openDirectory()
void tst_QFile::openStandardStreamsFileDescriptors()
{
-#ifdef Q_WS_WINCE
+#ifdef Q_OS_WINCE
//allthough Windows CE (not mobile!) has functions that allow redirecting
//the standard file descriptors to a file (see SetStdioPathW/GetStdioPathW)
//it does not have functions to simply open them like below .
diff --git a/tests/auto/corelib/io/qprocessenvironment/tst_qprocessenvironment.cpp b/tests/auto/corelib/io/qprocessenvironment/tst_qprocessenvironment.cpp
index d88ffdedb7..1c6bf6f19c 100644
--- a/tests/auto/corelib/io/qprocessenvironment/tst_qprocessenvironment.cpp
+++ b/tests/auto/corelib/io/qprocessenvironment/tst_qprocessenvironment.cpp
@@ -251,7 +251,7 @@ void tst_QProcessEnvironment::systemEnvironment()
QVERIFY(nonexistant.isNull());
-#ifdef Q_WS_WINCE
+#ifdef Q_OS_WINCE
// Windows CE has no environment
QVERIFY(path.isEmpty());
QVERIFY(!system.contains("PATH"));
@@ -278,7 +278,7 @@ void tst_QProcessEnvironment::systemEnvironment()
void tst_QProcessEnvironment::putenv()
{
-#ifdef Q_WS_WINCE
+#ifdef Q_OS_WINCE
QSKIP("Windows CE has no environment", SkipAll);
#else
static const char envname[] = "WE_RE_SETTING_THIS_ENVIRONMENT_VARIABLE";