diff options
author | Friedemann Kleint <Friedemann.Kleint@digia.com> | 2013-07-26 14:26:23 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-07-29 13:49:44 +0200 |
commit | 646503bfcd53897a630a1844860e139157d65640 (patch) | |
tree | 705beecbbac5de59d8e1492d90cb166bad054588 /src/imports | |
parent | 134ab4bd5ad895fbc7c2ca0324348519d33e19ba (diff) |
FolderListModel: Fix setting of directory in componentComplete().
Discovered when fixing
Task-number: QTBUG-32139
Change-Id: I94d1a958069666ed43db146a7393e5f1ff4e177e
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Diffstat (limited to 'src/imports')
-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 7ba2981a4e..ca0739270a 100644 --- a/src/imports/folderlistmodel/qquickfolderlistmodel.cpp +++ b/src/imports/folderlistmodel/qquickfolderlistmodel.cpp @@ -536,8 +536,8 @@ void QQuickFolderListModel::componentComplete() { Q_D(QQuickFolderListModel); - if (!d->currentDir.isValid() || d->currentDir.toLocalFile().isEmpty() || !QDir().exists(d->currentDir.toLocalFile())) - setFolder(QUrl(QLatin1String("file://")+QDir::currentPath())); + if (!d->currentDir.isValid() || !d->currentDir.isLocalFile() || !QDir().exists(d->currentDir.toLocalFile())) + setFolder(QUrl::fromLocalFile(QDir::currentPath())); } /*! |