diff options
Diffstat (limited to 'src/imports')
-rw-r--r-- | src/imports/folderlistmodel/fileinfothread.cpp | 6 | ||||
-rw-r--r-- | src/imports/folderlistmodel/qquickfolderlistmodel.cpp | 4 |
2 files changed, 6 insertions, 4 deletions
diff --git a/src/imports/folderlistmodel/fileinfothread.cpp b/src/imports/folderlistmodel/fileinfothread.cpp index f7587c25f5..2d53b211ad 100644 --- a/src/imports/folderlistmodel/fileinfothread.cpp +++ b/src/imports/folderlistmodel/fileinfothread.cpp @@ -92,7 +92,8 @@ void FileInfoThread::removePath(const QString &path) { QMutexLocker locker(&mutex); #ifndef QT_NO_FILESYSTEMWATCHER - watcher->removePath(path); + if (!path.startsWith(QLatin1Char(':'))) + watcher->removePath(path); #endif currentPath.clear(); } @@ -103,7 +104,8 @@ void FileInfoThread::setPath(const QString &path) QMutexLocker locker(&mutex); #ifndef QT_NO_FILESYSTEMWATCHER - watcher->addPath(path); + if (!path.startsWith(QLatin1Char(':'))) + watcher->addPath(path); #endif currentPath = path; needUpdate = true; 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())); } |