diff options
author | Xizhi Zhu <xizhi.zhu@gmail.com> | 2012-01-23 21:21:40 +0100 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-01-30 16:50:21 +0100 |
commit | d3fdc132fe67806fe4a5ab73c43effa281c6d8a2 (patch) | |
tree | 611578b8cf49dd00f69e68ab7e4d445c1080b479 /src/corelib/io/qfilesystementry.cpp | |
parent | 0c29259fd7c6f6283d17b598ec61347fc214b869 (diff) |
Remove Symbian specific code from QtCore.
Change-Id: I131303e28a12dccb96de3de4ca0073b389a9bbae
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Diffstat (limited to 'src/corelib/io/qfilesystementry.cpp')
-rw-r--r-- | src/corelib/io/qfilesystementry.cpp | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/src/corelib/io/qfilesystementry.cpp b/src/corelib/io/qfilesystementry.cpp index da4f57493e..46881a1e5c 100644 --- a/src/corelib/io/qfilesystementry.cpp +++ b/src/corelib/io/qfilesystementry.cpp @@ -176,7 +176,7 @@ void QFileSystemEntry::resolveNativeFilePath() const QString QFileSystemEntry::fileName() const { findLastSeparator(); -#if defined(Q_OS_WIN) || defined(Q_OS_SYMBIAN) +#if defined(Q_OS_WIN) if (m_lastSeparator == -1 && m_filePath.length() >= 2 && m_filePath.at(1) == QLatin1Char(':')) return m_filePath.mid(2); #endif @@ -187,7 +187,7 @@ QString QFileSystemEntry::path() const { findLastSeparator(); if (m_lastSeparator == -1) { -#if defined(Q_OS_WIN) || defined(Q_OS_SYMBIAN) +#if defined(Q_OS_WIN) if (m_filePath.length() >= 2 && m_filePath.at(1) == QLatin1Char(':')) return m_filePath.left(2); #endif @@ -195,7 +195,7 @@ QString QFileSystemEntry::path() const } if (m_lastSeparator == 0) return QString(QLatin1Char('/')); -#if defined(Q_OS_WIN) || defined(Q_OS_SYMBIAN) +#if defined(Q_OS_WIN) if (m_lastSeparator == 2 && m_filePath.at(1) == QLatin1Char(':')) return m_filePath.left(m_lastSeparator + 1); #endif @@ -205,7 +205,7 @@ QString QFileSystemEntry::path() const QString QFileSystemEntry::baseName() const { findFileNameSeparators(); -#if defined(Q_OS_WIN) || defined(Q_OS_SYMBIAN) +#if defined(Q_OS_WIN) if (m_lastSeparator == -1 && m_filePath.length() >= 2 && m_filePath.at(1) == QLatin1Char(':')) return m_filePath.mid(2); #endif @@ -221,7 +221,7 @@ QString QFileSystemEntry::baseName() const QString QFileSystemEntry::completeBaseName() const { findFileNameSeparators(); -#if defined(Q_OS_WIN) || defined(Q_OS_SYMBIAN) +#if defined(Q_OS_WIN) if (m_lastSeparator == -1 && m_filePath.length() >= 2 && m_filePath.at(1) == QLatin1Char(':')) return m_filePath.mid(2); #endif @@ -253,7 +253,7 @@ QString QFileSystemEntry::completeSuffix() const return m_filePath.mid(qMax((qint16)0, m_lastSeparator) + m_firstDotInFileName + 1); } -#if defined(Q_OS_WIN) || defined(Q_OS_SYMBIAN) +#if defined(Q_OS_WIN) bool QFileSystemEntry::isRelative() const { resolveFilePath(); @@ -266,9 +266,7 @@ bool QFileSystemEntry::isAbsolute() const resolveFilePath(); return (!m_filePath.isEmpty() && ((m_filePath.length() >= 3 && (m_filePath[0].isLetter() && m_filePath[1].unicode() == ':' && m_filePath[2].unicode() == '/')) -#ifdef Q_OS_WIN || (m_filePath.length() >= 2 && (m_filePath.at(0) == QLatin1Char('/') && m_filePath.at(1) == QLatin1Char('/'))) -#endif )); } #else @@ -284,7 +282,7 @@ bool QFileSystemEntry::isAbsolute() const } #endif -#if defined(Q_OS_WIN) || defined(Q_OS_SYMBIAN) +#if defined(Q_OS_WIN) bool QFileSystemEntry::isDriveRoot() const { resolveFilePath(); @@ -298,12 +296,10 @@ bool QFileSystemEntry::isRoot() const { resolveFilePath(); if (m_filePath == QLatin1String("/") -#if defined(Q_OS_WIN) || defined(Q_OS_SYMBIAN) - || isDriveRoot() #if defined(Q_OS_WIN) + || isDriveRoot() || isUncRoot(m_filePath) #endif -#endif ) return true; |