2016-09-28 17:50:07 +02:00
|
|
|
Index: gwenview-16.08.1/app/main.cpp
|
2016-09-28 13:58:00 +02:00
|
|
|
===================================================================
|
2016-09-28 17:50:07 +02:00
|
|
|
--- gwenview-16.08.1.orig/app/main.cpp
|
|
|
|
+++ gwenview-16.08.1/app/main.cpp
|
2016-09-28 13:58:00 +02:00
|
|
|
@@ -59,8 +59,19 @@ public:
|
|
|
|
mMultipleUrlsDir.reset(new QTemporaryDir);
|
|
|
|
mUrl = QUrl::fromLocalFile(mMultipleUrlsDir->path());
|
|
|
|
QList<QUrl> 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))
|
2016-09-28 17:50:07 +02:00
|
|
|
+ list << QUrl::fromUserInput(url, QDir::currentPath(), QUrl::AssumeLocalFile);
|
2016-09-28 13:58:00 +02:00
|
|
|
+#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);
|
2016-09-28 17:50:07 +02:00
|
|
|
@@ -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('/'))) {
|