forked from pool/gwenview5
27 lines
1.1 KiB
Diff
27 lines
1.1 KiB
Diff
|
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<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))
|
||
|
+ 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);
|