aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFabian Vogt <fabian@ritter-vogt.de>2017-02-11 21:07:54 (GMT)
committerFabian Vogt <fabian@ritter-vogt.de>2017-02-13 15:11:37 (GMT)
commite70f8134a2bc4b3647e245c05f469aeed462a246 (patch)
treeb4491c2cf3d4f0edd876571660eda8ee42bab555
parentab3298b3f5f728765d5afa8830aa7793140617c8 (diff)
Do not treat filename in selection as URL
Summary: KFileWidget::setSelection(QString &) accepts either absolute URLs or relative paths. If the filename contains a :, it gets treated as a URL and gets rejected. This forces setSelection to parse it as URL. CCBUG: 376365 Subscribers: plasma-devel Tags: #plasma Differential Revision: https://phabricator.kde.org/D4579
-rw-r--r--src/platformtheme/kdeplatformfiledialoghelper.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/platformtheme/kdeplatformfiledialoghelper.cpp b/src/platformtheme/kdeplatformfiledialoghelper.cpp
index 05cfe35..c0ce601 100644
--- a/src/platformtheme/kdeplatformfiledialoghelper.cpp
+++ b/src/platformtheme/kdeplatformfiledialoghelper.cpp
@@ -126,7 +126,7 @@ void KDEPlatformFileDialog::selectFile(const QUrl &filename)
{
QUrl dirUrl = filename.adjusted(QUrl::RemoveFilename);
m_fileWidget->setUrl(dirUrl);
- m_fileWidget->setSelection(filename.fileName());
+ m_fileWidget->setSelection(filename.toString());
}
void KDEPlatformFileDialog::setViewMode(QFileDialogOptions::ViewMode view)