summaryrefslogtreecommitdiffstats
path: root/src/gui/dialogs
diff options
context:
space:
mode:
authorMartin Jones <martin.jones@nokia.com>2010-03-22 04:09:20 (GMT)
committerMartin Jones <martin.jones@nokia.com>2010-03-22 04:09:20 (GMT)
commitc1958338bb94f045c846147bdb7224377a2122a6 (patch)
treebab76e1baed0fcc5f49697378c9d5e07bdec0b42 /src/gui/dialogs
parent44660e6d34ce969069a82fe26f5e4b13d4d5ec78 (diff)
downloadQt-c1958338bb94f045c846147bdb7224377a2122a6.zip
Qt-c1958338bb94f045c846147bdb7224377a2122a6.tar.gz
Qt-c1958338bb94f045c846147bdb7224377a2122a6.tar.bz2
Set role names for QFileSystemModel and QDirModel
Task-number: QTBUG-7479 Reviewed-by: Alexis Menard
Diffstat (limited to 'src/gui/dialogs')
-rw-r--r--src/gui/dialogs/qfilesystemmodel.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/gui/dialogs/qfilesystemmodel.cpp b/src/gui/dialogs/qfilesystemmodel.cpp
index ba0a560..2f1933c 100644
--- a/src/gui/dialogs/qfilesystemmodel.cpp
+++ b/src/gui/dialogs/qfilesystemmodel.cpp
@@ -1896,6 +1896,13 @@ void QFileSystemModelPrivate::init()
q->connect(&fileInfoGatherer, SIGNAL(directoryLoaded(QString)),
q, SIGNAL(directoryLoaded(QString)));
q->connect(&delayedSortTimer, SIGNAL(timeout()), q, SLOT(_q_performDelayedSort()), Qt::QueuedConnection);
+
+ QHash<int, QByteArray> roles = q->roleNames();
+ roles.insertMulti(QFileSystemModel::FileIconRole, "fileIcon"); // == Qt::decoration
+ roles.insert(QFileSystemModel::FilePathRole, "filePath");
+ roles.insert(QFileSystemModel::FileNameRole, "fileName");
+ roles.insert(QFileSystemModel::FilePermissions, "filePermissions");
+ q->setRoleNames(roles);
}
/*!