]> cloud.milkyroute.net Git - dolphin.git/commitdiff
Pass current dir explicitly to QUrl::fromUserInput
authorDavid Faure <faure@kde.org>
Sun, 2 Oct 2016 23:05:42 +0000 (01:05 +0200)
committerDavid Faure <faure@kde.org>
Sun, 2 Oct 2016 23:05:42 +0000 (01:05 +0200)
It works with QString() but that's a bug, I didn't expect it to
work with my fromUserInput code and wrote otherwise in its documentation...

src/global.cpp

index d87a29c7ab7e8de9ecc8c454df0abadbf86fdf9c..3d6d7dd5e7b7d4ec6c0f3af89aa9bb967820f59f 100644 (file)
 
 QList<QUrl> Dolphin::validateUris(const QStringList& uriList)
 {
 
 QList<QUrl> Dolphin::validateUris(const QStringList& uriList)
 {
+    const QString currentDir = QDir::currentPath();
     QList<QUrl> urls;
     foreach (const QString& str, uriList) {
     QList<QUrl> urls;
     foreach (const QString& str, uriList) {
-        const QUrl url = QUrl::fromUserInput(str, QString(), QUrl::AssumeLocalFile);
+        const QUrl url = QUrl::fromUserInput(str, currentDir, QUrl::AssumeLocalFile);
         if (url.isValid()) {
             urls.append(url);
         } else {
         if (url.isValid()) {
             urls.append(url);
         } else {