┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArjun AK <[email protected]>2015-02-09 18:01:56 +0530
committerArjun AK <[email protected]>2015-02-09 18:15:37 +0530
commitb86d0def3924391e90fc582f719447e2ecdfa014 (patch)
treee5c3c96f434245470af5b0365f695ca9516c0896
parentf67bdd0fb70520b83f6428619c02a996724543b5 (diff)
Construct URLs passed via cmdline args using QUrl::fromUserInput()
Otherwise user will have to type "dolphin file:///tmp" instead of "dolphin /tmp" REVIEW: 122475 BUG: 343906
-rw-r--r--src/main.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 094402f90..321938323 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -105,9 +105,11 @@ extern "C" Q_DECL_EXPORT int kdemain(int argc, char **argv)
QList<QUrl> urls;
const QStringList args = parser.positionalArguments();
foreach (const QString& str, args) {
- const QUrl url(str);
+ const QUrl url = QUrl::fromUserInput(str);
if (url.isValid()) {
urls.append(url);
+ } else {
+ qWarning() << "Invalid URL: " << str;
}
}