From cbc2868b489f04fb1a9f7ee5ea8e92f5f9a5ca5ca370f87b805817911185daf8 Mon Sep 17 00:00:00 2001 From: Fabian Vogt Date: Sun, 12 Feb 2017 11:01:58 +0000 Subject: [PATCH] - Add patch to fix prefiling of filenames with colons (kde#376365): * 0001-Do-not-treat-filename-in-selection-as-URL.patch OBS-URL: https://build.opensuse.org/package/show/KDE:Frameworks5/plasma5-integration?expand=0&rev=44 --- ...t-treat-filename-in-selection-as-URL.patch | 38 +++++++++++++++++++ plasma5-integration.changes | 6 +++ plasma5-integration.spec | 3 ++ 3 files changed, 47 insertions(+) create mode 100644 0001-Do-not-treat-filename-in-selection-as-URL.patch diff --git a/0001-Do-not-treat-filename-in-selection-as-URL.patch b/0001-Do-not-treat-filename-in-selection-as-URL.patch new file mode 100644 index 0000000..adb507a --- /dev/null +++ b/0001-Do-not-treat-filename-in-selection-as-URL.patch @@ -0,0 +1,38 @@ +From b9298a5f0cd0763d5c7fc58655fa791e0fa60915 Mon Sep 17 00:00:00 2001 +From: Fabian Vogt +Date: Sat, 11 Feb 2017 22:07:54 +0100 +Subject: [PATCH] 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 +--- + src/platformtheme/kdeplatformfiledialoghelper.cpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/platformtheme/kdeplatformfiledialoghelper.cpp b/src/platformtheme/kdeplatformfiledialoghelper.cpp +index d94060f..a2b775f 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) +-- +2.11.0 + diff --git a/plasma5-integration.changes b/plasma5-integration.changes index ea00413..d0d2777 100644 --- a/plasma5-integration.changes +++ b/plasma5-integration.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Sun Feb 12 11:01:07 UTC 2017 - fabian@ritter-vogt.de + +- Add patch to fix prefiling of filenames with colons (kde#376365): + * 0001-Do-not-treat-filename-in-selection-as-URL.patch + ------------------------------------------------------------------- Tue Feb 7 18:54:39 CET 2017 - fabian@ritter-vogt.de diff --git a/plasma5-integration.spec b/plasma5-integration.spec index e6863ce..075c5db 100644 --- a/plasma5-integration.spec +++ b/plasma5-integration.spec @@ -29,6 +29,8 @@ License: GPL-2.0+ Group: System/GUI/KDE Url: http://www.kde.org Source: http://download.kde.org/stable/plasma/%{version}/plasma-integration-%{version}.tar.xz +# PATCH-FIX-UPSTREAM 0001-Do-not-treat-filename-in-selection-as-URL.patch fabian@ritter-vogt.de kde#376365 https://phabricator.kde.org/D4579 -- Do not treat filename in selection as URL +Patch1: 0001-Do-not-treat-filename-in-selection-as-URL.patch BuildRequires: extra-cmake-modules >= 5.17.0 BuildRequires: kf5-filesystem BuildRequires: libQt5Gui-private-headers-devel >= 5.5.0 @@ -77,6 +79,7 @@ Applications do not need to link to this directly. %lang_package -n plasma5-integration-plugin %prep %setup -q -n plasma-integration-%{version} +%patch1 -p1 %build %cmake_kf5 -d build