diff options
author | Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> | 2016-03-08 15:51:15 +0100 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> | 2016-04-07 10:24:45 +0000 |
commit | 115d4fc8cc1816d70f41c839d7eaa4e24ff86db2 (patch) | |
tree | a79244d8bb42aa7cd675cd6748c737e2559311c0 /src/widgets/dialogs/qfilesystemmodel.cpp | |
parent | 4cb795cbdbc4d117c9de623b086975ebdf1f9a15 (diff) |
QtWidgets: Remove Windows CE.
Remove Windows CE-specific files, #ifdef sections for Q_OS_WINCE and wince
.pro file clauses in library, examples and tests.
Task-number: QTBUG-51673
Change-Id: I102745aaca9d9737f2108fe7618111743d5ae980
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Diffstat (limited to 'src/widgets/dialogs/qfilesystemmodel.cpp')
-rw-r--r-- | src/widgets/dialogs/qfilesystemmodel.cpp | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/src/widgets/dialogs/qfilesystemmodel.cpp b/src/widgets/dialogs/qfilesystemmodel.cpp index c72761f2ae..2f7edd8d07 100644 --- a/src/widgets/dialogs/qfilesystemmodel.cpp +++ b/src/widgets/dialogs/qfilesystemmodel.cpp @@ -366,13 +366,13 @@ QFileSystemModelPrivate::QFileSystemNode *QFileSystemModelPrivate::node(const QS // ### TODO can we use bool QAbstractFileEngine::caseSensitive() const? QStringList pathElements = absolutePath.split(QLatin1Char('/'), QString::SkipEmptyParts); if ((pathElements.isEmpty()) -#if !defined(Q_OS_WIN) || defined(Q_OS_WINCE) +#if !defined(Q_OS_WIN) && QDir::fromNativeSeparators(longPath) != QLatin1String("/") #endif ) return const_cast<QFileSystemModelPrivate::QFileSystemNode*>(&root); QModelIndex index = QModelIndex(); // start with "My Computer" -#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE) +#if defined(Q_OS_WIN) if (absolutePath.startsWith(QLatin1String("//"))) { // UNC path QString host = QLatin1String("\\\\") + pathElements.constFirst(); if (absolutePath == QDir::fromNativeSeparators(host)) @@ -398,7 +398,7 @@ QFileSystemModelPrivate::QFileSystemNode *QFileSystemModelPrivate::node(const QS } else #endif -#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE) +#if defined(Q_OS_WIN) { if (!pathElements.at(0).contains(QLatin1Char(':'))) { QString rootPath = QDir(longPath).rootPath(); @@ -831,7 +831,7 @@ QString QFileSystemModelPrivate::name(const QModelIndex &index) const */ QString QFileSystemModelPrivate::displayName(const QModelIndex &index) const { -#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE) +#if defined(Q_OS_WIN) QFileSystemNode *dirNode = node(index); if (!dirNode->volumeName.isNull()) return dirNode->volumeName + QLatin1String(" (") + name(index) + QLatin1Char(')'); @@ -1281,11 +1281,10 @@ QString QFileSystemModelPrivate::filePath(const QModelIndex &index) const idx = idx.parent(); } QString fullPath = QDir::fromNativeSeparators(path.join(QDir::separator())); -#if !defined(Q_OS_WIN) || defined(Q_OS_WINCE) +#if !defined(Q_OS_WIN) if ((fullPath.length() > 2) && fullPath[0] == QLatin1Char('/') && fullPath[1] == QLatin1Char('/')) fullPath = fullPath.mid(1); -#endif -#if defined(Q_OS_WIN) +#else if (fullPath.length() == 2 && fullPath.endsWith(QLatin1Char(':'))) fullPath.append(QLatin1Char('/')); #endif @@ -1676,7 +1675,7 @@ QFileSystemModelPrivate::QFileSystemNode* QFileSystemModelPrivate::addNode(QFile #else Q_UNUSED(info) #endif -#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE) && !defined(Q_OS_WINRT) +#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT) //The parentNode is "" so we are listing the drives if (parentNode->fileName.isEmpty()) { wchar_t name[MAX_PATH + 1]; |