debugged a crash, keys are now fetching, refactored main, added some exceptions instead of ints, debugged termination process

This commit is contained in:
Blue 2023-03-11 19:46:23 +03:00
parent 927bdf0dab
commit 4b68da458f
Signed by: blue
GPG key ID: 9B203B252A63EE38
9 changed files with 321 additions and 130 deletions

View file

@ -18,11 +18,53 @@
#define ROOT_H
#include <QApplication>
#include <QTranslator>
#include <QIcon>
#include <QSettings>
#include <QThread>
#include <vector>
#include <core/squawk.h>
#include <core/signalcatcher.h>
#include <shared/global.h>
#include "application.h"
class Root : public QApplication {
Q_OBJECT
public:
Root(int& argc, char* argv[]);
~Root();
bool notify(QObject* receiver, QEvent* e) override;
int run();
bool initializeSettings();
private slots:
void onCoreDestroyed();
private:
void initializeTranslation();
void initializeAppIcon();
void initializeComponents();
private:
static const std::vector<unsigned int> appIconSizes;
SignalCatcher signalCatcher;
QTranslator defaultTranslator;
QTranslator currentTranslator;
QIcon appIcon;
QSettings settings;
bool componentsInitialized;
Shared::Global* global;
QThread* coreThread;
Core::Squawk* core;
Application* gui;
};
#endif // ROOT_H