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/itemviews/qdirmodel.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/itemviews/qdirmodel.cpp')
-rw-r--r-- | src/widgets/itemviews/qdirmodel.cpp | 20 |
1 files changed, 6 insertions, 14 deletions
diff --git a/src/widgets/itemviews/qdirmodel.cpp b/src/widgets/itemviews/qdirmodel.cpp index dfb1d7619e..315d2503a4 100644 --- a/src/widgets/itemviews/qdirmodel.cpp +++ b/src/widgets/itemviews/qdirmodel.cpp @@ -858,7 +858,7 @@ QModelIndex QDirModel::index(const QString &path, int column) const return QModelIndex(); QString absolutePath = QDir(path).absolutePath(); -#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE) +#if defined(Q_OS_WIN) absolutePath = absolutePath.toLower(); // On Windows, "filename......." and "filename" are equivalent if (absolutePath.endsWith(QLatin1Char('.'))) { @@ -873,7 +873,7 @@ QModelIndex QDirModel::index(const QString &path, int column) const QStringList pathElements = absolutePath.split(QLatin1Char('/'), QString::SkipEmptyParts); if ((pathElements.isEmpty() || !QFileInfo::exists(path)) -#if !defined(Q_OS_WIN) || defined(Q_OS_WINCE) +#if !defined(Q_OS_WIN) && path != QLatin1String("/") #endif ) @@ -883,7 +883,7 @@ QModelIndex QDirModel::index(const QString &path, int column) const if (!d->root.populated) // make sure the root is populated d->populate(&d->root); -#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE) +#if defined(Q_OS_WIN) if (absolutePath.startsWith(QLatin1String("//"))) { // UNC path QString host = pathElements.first(); int r = 0; @@ -901,7 +901,7 @@ QModelIndex QDirModel::index(const QString &path, int column) const emit const_cast<QDirModel*>(this)->layoutChanged(); } else #endif -#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE) +#if defined(Q_OS_WIN) if (pathElements.at(0).endsWith(QLatin1Char(':'))) { pathElements[0] += QLatin1Char('/'); } @@ -925,7 +925,7 @@ QModelIndex QDirModel::index(const QString &path, int column) const const QFileInfo& fi = parent->children.at(j).info; QString childFileName; childFileName = idx.isValid() ? fi.fileName() : fi.absoluteFilePath(); -#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE) +#if defined(Q_OS_WIN) childFileName = childFileName.toLower(); #endif if (childFileName == element) { @@ -938,15 +938,7 @@ QModelIndex QDirModel::index(const QString &path, int column) const // we couldn't find the path element, we create a new node since we _know_ that the path is valid if (row == -1) { -#if defined(Q_OS_WINCE) - QString newPath; - if (parent->info.isRoot()) - newPath = parent->info.absoluteFilePath() + element; - else - newPath = parent->info.absoluteFilePath() + QLatin1Char('/') + element; -#else QString newPath = parent->info.absoluteFilePath() + QLatin1Char('/') + element; -#endif if (!d->allowAppendChild || !QFileInfo(newPath).isDir()) return QModelIndex(); d->appendChild(parent, newPath); @@ -1290,7 +1282,7 @@ QString QDirModelPrivate::name(const QModelIndex &index) const const QFileInfo info = n->info; if (info.isRoot()) { QString name = info.absoluteFilePath(); -#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE) +#if defined(Q_OS_WIN) if (name.startsWith(QLatin1Char('/'))) // UNC host return info.fileName(); if (name.endsWith(QLatin1Char('/'))) |