[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [kio-gdrive/1.0] src: Fix broken QUrl construction
From: Elvis Angelaccio <elvis.angelaccio () kde ! org>
Date: 2016-10-01 14:38:11
Message-ID: E1bqLQZ-000428-Mb () code ! kde ! org
[Download RAW message or body]
Git commit beb01773c0d297e59717f8c060866e07db09a265 by Elvis Angelaccio.
Committed on 01/10/2016 at 14:32.
Pushed by elvisangelaccio into branch '1.0'.
Fix broken QUrl construction
This fixes a regression caused by the KUrl -> QUrl port.
QUrl::fromUserInput results in an URL with the http:// scheme,
while we need to gdrive:// one.
BUG: 367988
BUG: 369581
FIXED-IN: 1.0.1
M +4 -2 src/kio_gdrive.cpp
http://commits.kde.org/kio-gdrive/beb01773c0d297e59717f8c060866e07db09a265
diff --git a/src/kio_gdrive.cpp b/src/kio_gdrive.cpp
index 4565fb5..9fc46e8 100644
--- a/src/kio_gdrive.cpp
+++ b/src/kio_gdrive.cpp
@@ -322,10 +322,12 @@ QString KIOGDrive::resolveFileIdFromPath(const QString &path, \
PathFlags flags)
query.addQuery(FileSearchQuery::Parents, FileSearchQuery::In, parentId);
query.addQuery(FileSearchQuery::Trashed, FileSearchQuery::Equals, components[1] \
== QLatin1String("trash"));
- const QString accountId = accountFromPath(QUrl::fromUserInput(path));
+ QUrl url;
+ url.setScheme(QStringLiteral("gdrive"));
+ url.setPath(path);
+ const QString accountId = accountFromPath(url);
FileFetchJob fetchJob(query, getAccount(accountId));
fetchJob.setFields(FileFetchJob::Id | FileFetchJob::Title | \
FileFetchJob::Labels);
- QUrl url(path);
if (!runJob(fetchJob, url, accountId)) {
return QString();
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic