From f9b040556368001b367731e7ea65227956952e25 Mon Sep 17 00:00:00 2001 From: Prasanth Ullattil Date: Wed, 25 Aug 2010 13:43:10 +0200 Subject: Fix QFileSystemEntry autotests for Windows Reviewed-by: Thomas Zander --- src/corelib/io/qfilesystementry.cpp | 2 +- tests/auto/qfilesystementry/tst_qfilesystementry.cpp | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/corelib/io/qfilesystementry.cpp b/src/corelib/io/qfilesystementry.cpp index 2d6740e..bed5435 100644 --- a/src/corelib/io/qfilesystementry.cpp +++ b/src/corelib/io/qfilesystementry.cpp @@ -122,7 +122,7 @@ bool QFileSystemEntry::isAbsolute() const { resolveFilePath(); return (!m_filePath.isEmpty() && (m_filePath[0].unicode() == '/') -#if defined(Q_FS_FAT) || defined(Q_OS_OS2EMX) || defined(Q_OS_SYMBIAN) +#if defined(Q_OS_WIN) || defined(Q_OS_SYMBIAN) || (m_filePath.length() >= 2 && ((m_filePath[0].isLetter() && m_filePath[1] == QLatin1Char(':')) || (m_filePath.at(0) == QLatin1Char('/') && m_filePath.at(1) == QLatin1Char('/')))) diff --git a/tests/auto/qfilesystementry/tst_qfilesystementry.cpp b/tests/auto/qfilesystementry/tst_qfilesystementry.cpp index 081beb6..58b7c6f 100644 --- a/tests/auto/qfilesystementry/tst_qfilesystementry.cpp +++ b/tests/auto/qfilesystementry/tst_qfilesystementry.cpp @@ -42,7 +42,7 @@ #include -#if defined(Q_FS_FAT) || defined(Q_OS_OS2EMX) || defined(Q_OS_SYMBIAN) +#if defined(Q_OS_WIN) || defined(Q_OS_SYMBIAN) # define WIN_STUFF #endif @@ -79,8 +79,8 @@ void tst_QFileSystemEntry::getSetCheck_data() QTest::newRow("relative") #if defined(WIN_STUFF) - << QByteArray("\\in\\a\\dir.tar.gz") - << "/in/a/dir.tar.gz" + << QByteArray("in\\a\\dir.tar.gz") + << "in/a/dir.tar.gz" #else << QByteArray("in/a/dir.tar.gz") << "in/a/dir.tar.gz" -- cgit v0.12