summaryrefslogtreecommitdiffstats
path: root/src/gui/itemviews
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-03-22 14:52:26 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-03-22 14:52:26 (GMT)
commitec2998df839f20e95c6407c794e6b258ed57edab (patch)
tree6e0776cf8a0e1f2bfc219ff467d8ae8430ba3865 /src/gui/itemviews
parent58e9855afce71448c709469270950e5add87d601 (diff)
parentced9f453fb7648c04a60932901bd370405c701eb (diff)
downloadQt-ec2998df839f20e95c6407c794e6b258ed57edab.zip
Qt-ec2998df839f20e95c6407c794e6b258ed57edab.tar.gz
Qt-ec2998df839f20e95c6407c794e6b258ed57edab.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: (24 commits) 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. Fix Flipable crash. Reduce amount of qmldir parsing ...
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