27 lines
755 B
C++
27 lines
755 B
C++
#include "mainwindow.h"
|
|
|
|
#include <QApplication>
|
|
#include <QCommandLineParser>
|
|
|
|
int main(int argc, char *argv[]) {
|
|
QApplication app(argc, argv);
|
|
|
|
QCommandLineParser cli_parser;
|
|
cli_parser.addHelpOption();
|
|
cli_parser.addVersionOption();
|
|
|
|
QCommandLineOption devModeOption({"d", "dev"}, "Run in dev mode");
|
|
cli_parser.addOption(devModeOption);
|
|
|
|
QCommandLineOption incrementalSearchOption({"i", "incremental"},
|
|
"Enable incremental search");
|
|
cli_parser.addOption(incrementalSearchOption);
|
|
|
|
cli_parser.process(app);
|
|
|
|
MainWindow main_window(nullptr, cli_parser.isSet(incrementalSearchOption),
|
|
cli_parser.isSet(devModeOption));
|
|
main_window.show();
|
|
return app.exec();
|
|
}
|