1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-07-03 23:50:33 +02:00
Files
joplin/QtClient/JoplinQtClient/main.cpp

38 lines
917 B
C++
Raw Normal View History

2016-12-10 22:39:53 +00:00
#include <stable.h>
2017-01-27 20:26:46 +00:00
#if defined(JOP_FRONT_END_CLI)
#include "cliapplication.h"
#elif defined(JOP_FRONT_END_GUI)
2016-12-11 16:09:39 +00:00
#include "application.h"
2017-01-27 20:26:46 +00:00
#endif
2016-12-10 22:39:53 +00:00
#include "models/folder.h"
#include "database.h"
#include "models/foldermodel.h"
#include "services/folderservice.h"
2017-01-31 20:19:03 +00:00
int main(int argc, char *argv[]) {
#if (!defined(JOP_FRONT_END_GUI) && !defined(JOP_FRONT_END_CLI))
qFatal("Either JOP_FRONT_END_GUI or JOP_FRONT_END_CLI must be defined!");
return 1;
#endif
#if (defined(JOP_FRONT_END_GUI) && defined(JOP_FRONT_END_CLI))
qFatal("JOP_FRONT_END_GUI and JOP_FRONT_END_CLI cannot both be defined!");
return 1;
#endif
#ifdef JOP_FRONT_END_GUI
2017-01-31 20:19:03 +00:00
qDebug() << "Front end: GUI";
2016-12-10 22:39:53 +00:00
QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
2017-01-31 20:19:03 +00:00
jop::Application app(argc, argv);
#endif
#ifdef JOP_FRONT_END_CLI
2017-01-31 20:19:03 +00:00
qDebug() << "Front end: CLI";
jop::CliApplication app(argc, argv);
#endif
return app.exec();
2017-01-31 20:19:03 +00:00
}