-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
48 lines (38 loc) · 1.08 KB
/
main.cpp
File metadata and controls
48 lines (38 loc) · 1.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
/*
Copyright (c) 2018 by Ilya Barykin
Released under the MIT License.
See the provided LICENSE.TXT file for details.
*/
#include <QtCore/QCoreApplication>
#include <utils/Zip.h>
#include <utils/logs/Logger.h>
#include <QtCore/QTimer>
#include <curl/curl.h>
#include <utils/Curl.h>
#include "Runner.h"
class TCoreApplication : public QCoreApplication {
public:
TCoreApplication(int argc, char **argv) : QCoreApplication(argc, argv) {};
bool notify(QObject *object, QEvent *event) override {
// try {
return QCoreApplication::notify(object, event);
// } catch (std::exception e) {
// qDebug() << "Error in Event handler: " << e.what();
// }
//
// return false;
}
};
int main(int argc, char **argv) {
TCoreApplication a(argc, argv);
curl_global_init(CURL_GLOBAL_DEFAULT);
logI("");
logI("Started RepostBot");
auto *logger = new Utils::Logger;
auto *storage = Storage::instance();
auto *app = Runner::instance();
Q_UNUSED(logger)
Q_UNUSED(storage)
app->start();
return QCoreApplication::exec();
}