From b2677affe2b98a879225ecb8c344b208241e02e2fe1d4e9256e1f0444c5f67e0 Mon Sep 17 00:00:00 2001 From: Luca Beltrame Date: Wed, 28 Sep 2016 11:58:00 +0000 Subject: [PATCH] Accepting request 430880 from home:alarrosa:branches:KDE:Applications - Add fix-multiple-arguments.diff to fix handling of multiple local file arguments in the command line (boo#1001276) OBS-URL: https://build.opensuse.org/request/show/430880 OBS-URL: https://build.opensuse.org/package/show/KDE:Applications/gwenview5?expand=0&rev=38 --- fix-multiple-arguments.diff | 26 ++++++++++++++++++++++++++ gwenview5.changes | 6 ++++++ gwenview5.spec | 3 +++ 3 files changed, 35 insertions(+) create mode 100644 fix-multiple-arguments.diff diff --git a/fix-multiple-arguments.diff b/fix-multiple-arguments.diff new file mode 100644 index 0000000..870f61a --- /dev/null +++ b/fix-multiple-arguments.diff @@ -0,0 +1,26 @@ +Index: gwenview-16.08.0/app/main.cpp +=================================================================== +--- gwenview-16.08.0.orig/app/main.cpp ++++ gwenview-16.08.0/app/main.cpp +@@ -59,8 +59,19 @@ public: + mMultipleUrlsDir.reset(new QTemporaryDir); + mUrl = QUrl::fromLocalFile(mMultipleUrlsDir->path()); + QList list; +- foreach(const QString & url, args) { +- list << QUrl::fromUserInput(url); ++ QStringList tmpArgs = args; ++ tmpArgs.removeDuplicates(); ++ foreach(const QString & url, tmpArgs) { ++#if (QT_VERSION >= QT_VERSION_CHECK(5, 4, 0)) ++ list << QUrl::fromUserInput(url, QDir::currentPath()); ++#else ++ QUrl tmpUrl = QUrl(url); ++ if (tmpUrl.scheme().isEmpty() && !url.startsWith(QLatin1Char('/'))) { ++ list << QUrl::fromLocalFile(url); ++ } else { ++ list << QUrl::fromUserInput(url); ++ } ++#endif + } + + KIO::CopyJob* job = KIO::link(list, mUrl); diff --git a/gwenview5.changes b/gwenview5.changes index 88e3ee8..5430d55 100644 --- a/gwenview5.changes +++ b/gwenview5.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Wed Sep 28 10:36:41 UTC 2016 - alarrosa@suse.com + +- Add fix-multiple-arguments.diff to fix handling of multiple local + file arguments in the command line (boo#1001276) + ------------------------------------------------------------------- Fri Sep 9 08:06:19 UTC 2016 - tittiatcoke@gmail.com diff --git a/gwenview5.spec b/gwenview5.spec index 855baf1..5ac7eae 100644 --- a/gwenview5.spec +++ b/gwenview5.spec @@ -25,6 +25,8 @@ License: GPL-2.0+ Group: Productivity/Graphics/Viewers Url: http://www.kde.org Source0: %{rname}-%{version}.tar.xz +# PATCH-FIX-UPSTREAM fix-multiple-arguments.diff boo#1001276 alarrosa@suse.com - Fix handling of multiple local file arguments in command line +Patch0: fix-multiple-arguments.diff BuildRequires: baloo5-devel BuildRequires: extra-cmake-modules >= 1.7.0 BuildRequires: kactivities5-devel @@ -60,6 +62,7 @@ hierarchy. %prep %setup -q -n %{rname}-%{version} +%patch0 -p1 %build %cmake_kf5 -d build -- -DGWENVIEW_SEMANTICINFO_BACKEND="Baloo"