File indexing completed on 2024-05-05 04:01:43

0001 /*
0002     SPDX-FileCopyrightText: 2016 Volker Krause <vkrause@kde.org>
0003 
0004     SPDX-License-Identifier: MIT
0005 */
0006 
0007 #include "codeeditor.h"
0008 
0009 #include <QApplication>
0010 #include <QCommandLineParser>
0011 
0012 int main(int argc, char **argv)
0013 {
0014     QApplication app(argc, argv);
0015 
0016     QCommandLineParser parser;
0017     parser.addHelpOption();
0018     parser.addPositionalArgument(QStringLiteral("source"), QStringLiteral("The source file to highlight."));
0019     parser.process(app);
0020 
0021     CodeEditor edit;
0022     edit.resize(1024, 1024);
0023     edit.show();
0024     if (parser.positionalArguments().size() == 1) {
0025         edit.openFile(parser.positionalArguments().at(0));
0026     }
0027     return app.exec();
0028 }