Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Reimplement support for relative paths in argv (ported to QUrl::fromUserInput)

Reviewed by Martin Sandsmark.
parent c53ba5bd
......@@ -25,6 +25,7 @@
#include <QApplication>
#include <QCommandLineParser>
#include <QUrl>
#include <QDir>
#include <KAboutData>
#include <KLocalizedString>
......@@ -81,7 +82,9 @@ int main(int argc, char *argv[])
MainWindow *mw = new MainWindow();
QStringList args = options.positionalArguments();
if (args.count() > 0) mw->scan(QUrl::fromUserInput(args.at(0)));
if (args.count() > 0) {
mw->scan(QUrl::fromUserInput(args.at(0), QDir::currentPath(), QUrl::AssumeLocalFile));
}
mw->show();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment