summaryrefslogtreecommitdiffstats
path: root/src/gui/dialogs
diff options
context:
space:
mode:
authorZeno Albisser <zeno.albisser@nokia.com>2010-05-12 12:41:49 (GMT)
committerZeno Albisser <zeno.albisser@nokia.com>2010-05-27 09:03:33 (GMT)
commitfa46fa236b5f4a9a5677da2e7464a6b9f8b7b5f3 (patch)
tree43d234ba02561f62c78240c9484558d27f784f1e /src/gui/dialogs
parentf65a036ff7c4023a0603d2887b29bfe7e182034a (diff)
downloadQt-fa46fa236b5f4a9a5677da2e7464a6b9f8b7b5f3.zip
Qt-fa46fa236b5f4a9a5677da2e7464a6b9f8b7b5f3.tar.gz
Qt-fa46fa236b5f4a9a5677da2e7464a6b9f8b7b5f3.tar.bz2
make QFileSystemModel distinguish C: from C:\
Since QFileSystemModel just uses a C: to represent C:\ for esthetics, we now need to append a slash to make sure we do not accidently point to the current working directory on C:\. Reviewed-by: Joao Task-number: QTBUG-8241
Diffstat (limited to 'src/gui/dialogs')
-rw-r--r--src/gui/dialogs/qfilesystemmodel.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gui/dialogs/qfilesystemmodel.cpp b/src/gui/dialogs/qfilesystemmodel.cpp
index 8a6190f..e5a8445 100644
--- a/src/gui/dialogs/qfilesystemmodel.cpp
+++ b/src/gui/dialogs/qfilesystemmodel.cpp
@@ -1290,6 +1290,10 @@ QString QFileSystemModelPrivate::filePath(const QModelIndex &index) const
if ((fullPath.length() > 2) && fullPath[0] == QLatin1Char('/') && fullPath[1] == QLatin1Char('/'))
fullPath = fullPath.mid(1);
#endif
+#if defined(Q_OS_WIN)
+ if (fullPath.length() == 2 && fullPath.endsWith(QLatin1Char(':')))
+ fullPath.append(QLatin1Char('/'));
+#endif
return fullPath;
}