diff options
author | Liang Qi <liang.qi@qt.io> | 2016-06-13 09:04:09 +0200 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2016-06-13 19:06:06 +0200 |
commit | 4d2f743baaf6869693f4540df668e1b998154785 (patch) | |
tree | ba712b420e5d299be28faf641d30585ae8dce4e7 /src/imports/folderlistmodel | |
parent | 0c5a9ff9876cb1af53317720d1de8baae003e21d (diff) | |
parent | 0932a59971f606f07b41da19f3974d51b7008180 (diff) |
Merge remote-tracking branch 'origin/5.7' into dev
Conflicts:
src/plugins/qmltooling/qmldbg_profiler/qqmlprofilerservice.cpp
Change-Id: I26d6435a29cac3840bb567ade5149c2562a94bf9
Diffstat (limited to 'src/imports/folderlistmodel')
-rw-r--r-- | src/imports/folderlistmodel/qquickfolderlistmodel.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/imports/folderlistmodel/qquickfolderlistmodel.cpp b/src/imports/folderlistmodel/qquickfolderlistmodel.cpp index 66af37c40c..1c94fddecf 100644 --- a/src/imports/folderlistmodel/qquickfolderlistmodel.cpp +++ b/src/imports/folderlistmodel/qquickfolderlistmodel.cpp @@ -491,10 +491,11 @@ QUrl QQuickFolderListModel::parentFolder() const return QUrl(); localFile = dir.path(); } else { - const int pos = d->currentDir.path().lastIndexOf(QLatin1Char('/')); + const QString path = d->currentDir.path(); + const int pos = path.lastIndexOf(QLatin1Char('/')); if (pos <= 0) return QUrl(); - localFile = d->currentDir.path().left(pos); + localFile = path.left(pos); } return QUrl::fromLocalFile(localFile); } |