summaryrefslogtreecommitdiffstats
path: root/src/widgets/dialogs/qfilesystemmodel_p.h
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2018-01-11 11:40:34 +0000
committerThe Qt Project <gerrit-noreply@qt-project.org>2018-01-11 11:40:34 +0000
commit17595102012616697237721bac022ddc342407f2 (patch)
tree2ce1048a256ef106ed8f848af31d86cf2b1f2c87 /src/widgets/dialogs/qfilesystemmodel_p.h
parent1623f66989d162faead5200e50b48d079edda3ba (diff)
parent9bee6712fc7fd4c8083b4c2c9b1eb0c54d4725dd (diff)
Merge "Merge remote-tracking branch 'origin/5.9' into 5.10" into refs/staging/5.10
Diffstat (limited to 'src/widgets/dialogs/qfilesystemmodel_p.h')
-rw-r--r--src/widgets/dialogs/qfilesystemmodel_p.h19
1 files changed, 18 insertions, 1 deletions
diff --git a/src/widgets/dialogs/qfilesystemmodel_p.h b/src/widgets/dialogs/qfilesystemmodel_p.h
index 640225529b..e8bae4f659 100644
--- a/src/widgets/dialogs/qfilesystemmodel_p.h
+++ b/src/widgets/dialogs/qfilesystemmodel_p.h
@@ -72,6 +72,23 @@ class ExtendedInformation;
class QFileSystemModelPrivate;
class QFileIconProvider;
+#if defined(Q_OS_WIN)
+class QFileSystemModelNodePathKey : public QString
+{
+public:
+ QFileSystemModelNodePathKey() {}
+ QFileSystemModelNodePathKey(const QString &other) : QString(other) {}
+ QFileSystemModelNodePathKey(const QFileSystemModelNodePathKey &other) : QString(other) {}
+ bool operator==(const QFileSystemModelNodePathKey &other) const { return !compare(other, Qt::CaseInsensitive); }
+};
+
+Q_DECLARE_TYPEINFO(QFileSystemModelNodePathKey, Q_MOVABLE_TYPE);
+
+inline uint qHash(const QFileSystemModelNodePathKey &key) { return qHash(key.toCaseFolded()); }
+#else // Q_OS_WIN
+typedef QString QFileSystemModelNodePathKey;
+#endif
+
class Q_AUTOTEST_EXPORT QFileSystemModelPrivate : public QAbstractItemModelPrivate
{
Q_DECLARE_PUBLIC(QFileSystemModel)
@@ -189,7 +206,7 @@ public:
bool populatedChildren;
bool isVisible;
- QHash<QString,QFileSystemNode *> children;
+ QHash<QFileSystemModelNodePathKey, QFileSystemNode *> children;
QList<QString> visibleChildren;
int dirtyChildrenIndex;
QFileSystemNode *parent;