mirror of
https://invent.kde.org/system/dolphin
synced 2024-08-22 01:40:02 +00:00
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
This commit is contained in:
parent
f67bdd0fb7
commit
b86d0def39
|
@ -105,9 +105,11 @@ extern "C" Q_DECL_EXPORT int kdemain(int argc, char **argv)
|
||||||
QList<QUrl> urls;
|
QList<QUrl> urls;
|
||||||
const QStringList args = parser.positionalArguments();
|
const QStringList args = parser.positionalArguments();
|
||||||
foreach (const QString& str, args) {
|
foreach (const QString& str, args) {
|
||||||
const QUrl url(str);
|
const QUrl url = QUrl::fromUserInput(str);
|
||||||
if (url.isValid()) {
|
if (url.isValid()) {
|
||||||
urls.append(url);
|
urls.append(url);
|
||||||
|
} else {
|
||||||
|
qWarning() << "Invalid URL: " << str;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue