File indexing completed on 2024-04-28 11:20:50

0001 /*
0002     SPDX-License-Identifier: GPL-2.0-or-later
0003     SPDX-FileCopyrightText: 2018 Sirgienko Nikita <warquark@gmail.com>
0004 */
0005 
0006 #include <QApplication>
0007 #include <QUrl>
0008 #include <QDebug>
0009 #include "scripteditorwidget.h"
0010 
0011 int main(int argc, char **argv)
0012 {
0013     QApplication app(argc, argv);
0014 
0015     ScriptEditorWidget* editor = new ScriptEditorWidget(QLatin1String(""),QLatin1String(""));
0016 
0017     if (argc == 2)
0018         {
0019         // Open file, passed in arguments
0020         QString filename = QLatin1String(argv[1]);
0021         QUrl path = QUrl::fromLocalFile(filename);
0022         qDebug() << "open " << path;
0023         editor->open(path);
0024         }
0025 
0026     editor->show();
0027 
0028     return app.exec();
0029 }