First commit
There was history before but now there is no more.
This commit is contained in:
commit
8d57bfb1ae
35 changed files with 2231 additions and 0 deletions
54
main.cpp
Normal file
54
main.cpp
Normal file
|
@ -0,0 +1,54 @@
|
|||
// SPDX-License-Identifier: Unlicense
|
||||
|
||||
#include <exception>
|
||||
|
||||
#include <QApplication>
|
||||
#include <QCommandLineParser>
|
||||
#include <QIcon>
|
||||
#include <QObject>
|
||||
#include <QQmlApplicationEngine>
|
||||
#include <QQmlContext>
|
||||
#include <QQmlEngine>
|
||||
#include <QTextCodec>
|
||||
#include <QTextStream>
|
||||
#include <QTranslator>
|
||||
#include <QtDebug>
|
||||
|
||||
#include <io.h>
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
try {
|
||||
if (QIcon::themeName().isEmpty()) {
|
||||
QIcon::setThemeSearchPaths(QIcon::themeSearchPaths() << ":/icons");;
|
||||
QIcon::setThemeName("breeze");
|
||||
}
|
||||
|
||||
QApplication app{argc, argv};
|
||||
app.setOrganizationName("fuzbal");
|
||||
app.setApplicationName("fuzbal");
|
||||
app.setApplicationVersion(GIT_VERSION);
|
||||
|
||||
QTranslator translator;
|
||||
translator.load(QLocale(), "fuzbal", "_", ":/i18n");
|
||||
app.installTranslator(&translator);
|
||||
|
||||
QCommandLineParser parser;
|
||||
parser.setApplicationDescription("Friendly Usable Zero-Bullshit Annotator & Labeler");
|
||||
parser.addHelpOption();
|
||||
parser.addVersionOption();
|
||||
parser.process(app);
|
||||
|
||||
IO io;
|
||||
|
||||
QQmlApplicationEngine engine;
|
||||
engine.rootContext()->setContextProperty("io", &io);
|
||||
engine.load(QUrl{"qrc:/main.qml"});
|
||||
|
||||
return app.exec();
|
||||
} catch (std::exception &e) {
|
||||
qCritical() << "critical error:" << e.what();
|
||||
return 1;
|
||||
} catch (...) {
|
||||
qCritical() << "critical error";
|
||||
return 1;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue