QtNovelUI/WordsIDE/xapp.cpp

24 lines
703 B
C++

#include "xapp.h"
#include <QDebug>
#include <iostream>
#include <xmlconfig.h>
using namespace Schedule;
using namespace Config;
XApp::XApp(int argc, char **argv) : QApplication(argc, argv) { global_configration->loadFile("./software.config"); }
bool XApp::notify(QObject *receiver, QEvent *event) {
try {
return QApplication::notify(receiver, event);
} catch (std::exception *x) {
std::cout << QString("XApplication::").toLocal8Bit().toStdString() << x->what() << std::endl;
delete x;
}
return false;
}
CommandsDispatcher *const XApp::disp_core = new CommandsDispatcher(QDir::home(), true);
Configration *const XApp::global_configration = new XMLConfig();