aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/imports/folderlistmodel/folderlistmodel.pro2
-rw-r--r--src/imports/folderlistmodel/qquickfolderlistmodel.cpp8
2 files changed, 6 insertions, 4 deletions
diff --git a/src/imports/folderlistmodel/folderlistmodel.pro b/src/imports/folderlistmodel/folderlistmodel.pro
index 592d8375c8..f30c2b2097 100644
--- a/src/imports/folderlistmodel/folderlistmodel.pro
+++ b/src/imports/folderlistmodel/folderlistmodel.pro
@@ -2,7 +2,7 @@ TARGET = qmlfolderlistmodelplugin
TARGETPATH = Qt/labs/folderlistmodel
include(../qimportbase.pri)
-QT += qml
+QT += core-private qml qml-private v8-private
SOURCES += qquickfolderlistmodel.cpp plugin.cpp \
fileinfothread.cpp
diff --git a/src/imports/folderlistmodel/qquickfolderlistmodel.cpp b/src/imports/folderlistmodel/qquickfolderlistmodel.cpp
index 294fe184d2..0aabb7ae74 100644
--- a/src/imports/folderlistmodel/qquickfolderlistmodel.cpp
+++ b/src/imports/folderlistmodel/qquickfolderlistmodel.cpp
@@ -43,8 +43,8 @@
#include "qquickfolderlistmodel.h"
#include "fileinfothread_p.h"
#include "fileproperty_p.h"
-#include <QDebug>
#include <qqmlcontext.h>
+#include <private/qqmlengine_p.h>
QT_BEGIN_NAMESPACE
@@ -365,7 +365,8 @@ void QQuickFolderListModel::setFolder(const QUrl &folder)
if (folder == d->currentDir)
return;
- QString resolvedPath = QDir::cleanPath(folder.path());
+ QString localPath = QQmlEnginePrivate::urlToLocalFileOrQrc(folder);
+ QString resolvedPath = QDir::cleanPath(QUrl(localPath).path());
beginResetModel();
@@ -407,7 +408,8 @@ void QQuickFolderListModel::setRootFolder(const QUrl &path)
if (path.isEmpty())
return;
- QString resolvedPath = QDir::cleanPath(path.path());
+ QString localPath = QQmlEnginePrivate::urlToLocalFileOrQrc(path);
+ QString resolvedPath = QDir::cleanPath(QUrl(localPath).path());
QFileInfo info(resolvedPath);
if (!info.exists() || !info.isDir())