diff --git a/fix-multiple-arguments.diff b/fix-multiple-arguments.diff new file mode 100644 index 0000000..5c76bd6 --- /dev/null +++ b/fix-multiple-arguments.diff @@ -0,0 +1,35 @@ +Index: gwenview-16.08.1/app/main.cpp +=================================================================== +--- gwenview-16.08.1.orig/app/main.cpp ++++ gwenview-16.08.1/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(), QUrl::AssumeLocalFile); ++#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); +@@ -68,7 +79,7 @@ public: + } else { + QString tmpArg = args.first(); + #if (QT_VERSION >= QT_VERSION_CHECK(5, 4, 0)) +- mUrl = QUrl::fromUserInput(tmpArg, QDir::currentPath()); ++ mUrl = QUrl::fromUserInput(tmpArg, QDir::currentPath(), QUrl::AssumeLocalFile); + #else + QUrl tmpUrl = QUrl(tmpArg); + if (tmpUrl.scheme().isEmpty() && !tmpArg.startsWith(QLatin1Char('/'))) { diff --git a/gwenview5.changes b/gwenview5.changes index 88e3ee8..fb2f2c1 100644 --- a/gwenview5.changes +++ b/gwenview5.changes @@ -1,3 +1,22 @@ +------------------------------------------------------------------- +Thu Sep 29 07:31:32 UTC 2016 - alarrosa@suse.com + +- Added a require for kdelibs4support since that package provides + qimageioplugins services for jpeg, png, gif and other image formats + and gwenview5 can't be used without it (boo#1001276). + +------------------------------------------------------------------- +Wed Sep 28 15:17:34 UTC 2016 - alarrosa@suse.com + +- Added QUrl::AssumeLocalFile to fix-multiple-arguments.diff to + mimic the patch accepted upstream + +------------------------------------------------------------------- +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..ed876ee 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 @@ -46,6 +48,7 @@ BuildRequires: pkgconfig(Qt5Svg) >= 5.2.0 BuildRequires: pkgconfig(Qt5Test) >= 5.2.0 BuildRequires: pkgconfig(Qt5Widgets) >= 5.2.0 BuildRequires: pkgconfig(Qt5X11Extras) >= 5.2.0 +Requires: kdelibs4support %if 0%{?suse_version} > 1320 Obsoletes: gwenview < %{version} %else @@ -60,6 +63,7 @@ hierarchy. %prep %setup -q -n %{rname}-%{version} +%patch0 -p1 %build %cmake_kf5 -d build -- -DGWENVIEW_SEMANTICINFO_BACKEND="Baloo"