1 | /* |
2 | SPDX-FileCopyrightText: 2016 Volker Krause <vkrause@kde.org> |
3 | |
4 | SPDX-License-Identifier: MIT |
5 | */ |
6 | |
7 | #include "codeeditor.h" |
8 | |
9 | #include <QApplication> |
10 | #include <QCommandLineParser> |
11 | |
12 | int main(int argc, char **argv) |
13 | { |
14 | QApplication app(argc, argv); |
15 | |
16 | QCommandLineParser parser; |
17 | parser.addHelpOption(); |
18 | parser.addPositionalArgument(QStringLiteral("source" ), QStringLiteral("The source file to highlight." )); |
19 | parser.process(app); |
20 | |
21 | CodeEditor edit; |
22 | edit.resize(w: 1024, h: 1024); |
23 | edit.show(); |
24 | if (parser.positionalArguments().size() == 1) { |
25 | edit.openFile(fileName: parser.positionalArguments().at(i: 0)); |
26 | } |
27 | return app.exec(); |
28 | } |
29 | |