Changeset View
Changeset View
Standalone View
Standalone View
tests/kwayland/main.cpp
Show All 21 Lines | |||||
22 | #include <QCommandLineParser> | 22 | #include <QCommandLineParser> | ||
23 | 23 | | |||
24 | int main(int argc, char **argv) | 24 | int main(int argc, char **argv) | ||
25 | { | 25 | { | ||
26 | QCoreApplication app(argc, argv); | 26 | QCoreApplication app(argc, argv); | ||
27 | 27 | | |||
28 | KScreen::WaylandTestServer server; | 28 | KScreen::WaylandTestServer server; | ||
29 | 29 | | |||
30 | QCommandLineOption config = QCommandLineOption(QStringList() << QStringLiteral("c") << "config", | 30 | QCommandLineOption config = QCommandLineOption(QStringList() << QStringLiteral("c") << QLatin1String("config"), | ||
31 | QStringLiteral("Config file"), "config"); | 31 | QStringLiteral("Config file"), QLatin1String("config")); | ||
32 | QCommandLineParser parser; | 32 | QCommandLineParser parser; | ||
33 | parser.addHelpOption(); | 33 | parser.addHelpOption(); | ||
34 | parser.addOption(config); | 34 | parser.addOption(config); | ||
35 | parser.process(app); | 35 | parser.process(app); | ||
36 | 36 | | |||
37 | if (parser.isSet(config)) { | 37 | if (parser.isSet(config)) { | ||
38 | server.setConfig(parser.value(config)); | 38 | server.setConfig(parser.value(config)); | ||
39 | } else { | 39 | } else { | ||
40 | server.setConfig(QString::fromLocal8Bit(TEST_DATA)+"/multipleoutput.json"); | 40 | server.setConfig(QString::fromLocal8Bit(TEST_DATA) + QLatin1String("/multipleoutput.json")); | ||
41 | } | 41 | } | ||
42 | server.start(); | 42 | server.start(); | ||
43 | return app.exec(); | 43 | return app.exec(); | ||
44 | } | 44 | } |