diff options
author | Gatis Paeglis <gatis.paeglis@digia.com> | 2014-08-12 14:46:05 +0200 |
---|---|---|
committer | Gatis Paeglis <gatis.paeglis@digia.com> | 2014-08-22 23:00:37 +0200 |
commit | 253e9257e1f586d1c1dfa585aa6f862d310cdec3 (patch) | |
tree | 4425049801c343aac4c39ee127104611b1484366 /src/imports/folderlistmodel/qquickfolderlistmodel.cpp | |
parent | 3cc2b8d7d94361ef786304024fd2ddca4103f94b (diff) |
Introspect qrc files in FolderListModel.
And don't use "file watchers" for resource file paths,
otherwise it generates the following warning:
QInotifyFileSystemWatcherEngine::addPaths: inotify_add_watch failed: No
such file or directory
Change-Id: I6b75c9195fb2b2ba7b3e0bb7d146fc5cd343927e
Task-number: QTBUG-40307
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Diffstat (limited to 'src/imports/folderlistmodel/qquickfolderlistmodel.cpp')
-rw-r--r-- | src/imports/folderlistmodel/qquickfolderlistmodel.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/imports/folderlistmodel/qquickfolderlistmodel.cpp b/src/imports/folderlistmodel/qquickfolderlistmodel.cpp index 5d84d7e5ba..5fc9d98d36 100644 --- a/src/imports/folderlistmodel/qquickfolderlistmodel.cpp +++ b/src/imports/folderlistmodel/qquickfolderlistmodel.cpp @@ -536,8 +536,8 @@ void QQuickFolderListModel::classBegin() void QQuickFolderListModel::componentComplete() { Q_D(QQuickFolderListModel); - - if (!d->currentDir.isValid() || !d->currentDir.isLocalFile() || !QDir().exists(d->currentDir.toLocalFile())) + QString localPath = QQmlFile::urlToLocalFileOrQrc(d->currentDir); + if (localPath.isEmpty() || !QDir(localPath).exists()) setFolder(QUrl::fromLocalFile(QDir::currentPath())); } |