aboutsummaryrefslogtreecommitdiffstats
path: root/src/imports/folderlistmodel/qquickfolderlistmodel.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/imports/folderlistmodel/qquickfolderlistmodel.cpp')
-rw-r--r--src/imports/folderlistmodel/qquickfolderlistmodel.cpp5
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);
}