Changeset View
Changeset View
Standalone View
Standalone View
main.cpp
Show All 12 Lines | |||||
13 | * the Free Software Foundation; either version 2 of the License, or * | 13 | * the Free Software Foundation; either version 2 of the License, or * | ||
14 | * (at your option) any later version. * | 14 | * (at your option) any later version. * | ||
15 | * * | 15 | * * | ||
16 | ***************************************************************************/ | 16 | ***************************************************************************/ | ||
17 | 17 | | |||
18 | #include <QApplication> | 18 | #include <QApplication> | ||
19 | #include <QCommandLineParser> | 19 | #include <QCommandLineParser> | ||
20 | #include <QCommandLineOption> | 20 | #include <QCommandLineOption> | ||
21 | #include <QDir> | ||||
21 | 22 | | |||
22 | #include <KAboutData> | 23 | #include <KAboutData> | ||
23 | #include <KLocalizedString> | 24 | #include <KLocalizedString> | ||
24 | 25 | | |||
25 | #include "kimeshell.h" | 26 | #include "kimeshell.h" | ||
26 | #include "version.h" | 27 | #include "version.h" | ||
27 | 28 | | |||
28 | static const char *description = | 29 | static const char *description = | ||
▲ Show 20 Lines • Show All 52 Lines • ▼ Show 20 Line(s) | 72 | { | |||
81 | { | 82 | { | ||
82 | int i = 0; | 83 | int i = 0; | ||
83 | for (; i < parser.positionalArguments().count(); i++ ) | 84 | for (; i < parser.positionalArguments().count(); i++ ) | ||
84 | { | 85 | { | ||
85 | KimeShell *kimeShell = new KimeShell(); | 86 | KimeShell *kimeShell = new KimeShell(); | ||
86 | kimeShell->setStdout(parser.isSet("stdout")); | 87 | kimeShell->setStdout(parser.isSet("stdout")); | ||
87 | kimeShell->readConfig(); | 88 | kimeShell->readConfig(); | ||
88 | kimeShell->show(); | 89 | kimeShell->show(); | ||
89 | kimeShell->openFile(parser.positionalArguments().at(i)); | 90 | kimeShell->openFile(QUrl::fromUserInput(parser.positionalArguments().at(i), QDir::currentPath(), QUrl::AssumeLocalFile)); | ||
90 | } | 91 | } | ||
91 | } | 92 | } | ||
92 | 93 | | |||
93 | } | 94 | } | ||
94 | 95 | | |||
95 | return app.exec(); | 96 | return app.exec(); | ||
96 | } | 97 | } |