summaryrefslogtreecommitdiffstats
path: root/src/gui/itemviews
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-03-22 22:43:31 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-03-22 22:43:31 (GMT)
commitb2fa1673937ac8100273729d925e445e2a938b03 (patch)
tree60b38ccee020490c510819516028187118fb5a9c /src/gui/itemviews
parentf50f94512a22b311277ba07e09cf59e2c73bb25c (diff)
parentd6b7df53f78c542f0a86d10f22f3459190fc58f7 (diff)
downloadQt-b2fa1673937ac8100273729d925e445e2a938b03.zip
Qt-b2fa1673937ac8100273729d925e445e2a938b03.tar.gz
Qt-b2fa1673937ac8100273729d925e445e2a938b03.tar.bz2
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-qml into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/qt-qml: (26 commits) Use canonical form for headers Remove exporting of QDeclarativeContext class symbols Remove non-existing header from pri file Fix Loader crash. Compile in namespace Deprecate inline Script {} blocks Update metaobjectbuilder version test. Set role names for QFileSystemModel and QDirModel Removed wrong parenthesis around property NOTIFY declaration Remove dead performance measurement code from QML Fix warning mentioned in the comments of QTBUG-9182. Fix test. Ensure positioner animations are triggered correctly Fix qdeclarativeqt::createQmlObject autotest Add MiddleButton = MidButton to MouseButtons enum. Fix qdeclarativetextedit::delegateLoading autotest Fix Behavior documentation due to easing changes. Fix crash when calling createObject on a component with errors. Initialize variable. Produce an error when trying to create objects in a PropertyChanges. ...
Diffstat (limited to 'src/gui/itemviews')
-rw-r--r--src/gui/itemviews/qdirmodel.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/gui/itemviews/qdirmodel.cpp b/src/gui/itemviews/qdirmodel.cpp
index 378a238..48599bc 100644
--- a/src/gui/itemviews/qdirmodel.cpp
+++ b/src/gui/itemviews/qdirmodel.cpp
@@ -1182,12 +1182,18 @@ QFileInfo QDirModel::fileInfo(const QModelIndex &index) const
void QDirModelPrivate::init()
{
+ Q_Q(QDirModel);
filters = QDir::AllEntries | QDir::NoDotAndDotDot;
sort = QDir::Name;
nameFilters << QLatin1String("*");
root.parent = 0;
root.info = QFileInfo();
clear(&root);
+ QHash<int, QByteArray> roles = q->roleNames();
+ roles.insertMulti(QDirModel::FileIconRole, "fileIcon"); // == Qt::decoration
+ roles.insert(QDirModel::FilePathRole, "filePath");
+ roles.insert(QDirModel::FileNameRole, "fileName");
+ q->setRoleNames(roles);
}
QDirModelPrivate::QDirNode *QDirModelPrivate::node(int row, QDirNode *parent) const