projects
/
profile
/
ivi
/
qtdeclarative.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix FolderListModel path issue on Windows
[profile/ivi/qtdeclarative.git]
/
src
/
imports
/
folderlistmodel
/
qquickfolderlistmodel.cpp
diff --git
a/src/imports/folderlistmodel/qquickfolderlistmodel.cpp
b/src/imports/folderlistmodel/qquickfolderlistmodel.cpp
index
294fe18
..
0aabb7a
100644
(file)
--- 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 "qquickfolderlistmodel.h"
#include "fileinfothread_p.h"
#include "fileproperty_p.h"
-#include <QDebug>
#include <qqmlcontext.h>
#include <qqmlcontext.h>
+#include <private/qqmlengine_p.h>
QT_BEGIN_NAMESPACE
QT_BEGIN_NAMESPACE
@@
-365,7
+365,8
@@
void QQuickFolderListModel::setFolder(const QUrl &folder)
if (folder == d->currentDir)
return;
if (folder == d->currentDir)
return;
- QString resolvedPath = QDir::cleanPath(folder.path());
+ QString localPath = QQmlEnginePrivate::urlToLocalFileOrQrc(folder);
+ QString resolvedPath = QDir::cleanPath(QUrl(localPath).path());
beginResetModel();
beginResetModel();
@@
-407,7
+408,8
@@
void QQuickFolderListModel::setRootFolder(const QUrl &path)
if (path.isEmpty())
return;
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())
QFileInfo info(resolvedPath);
if (!info.exists() || !info.isDir())