magpie/root.cpp

28 lines
620 B
C++
Raw Normal View History

2023-11-22 23:13:33 +00:00
#include "root.h"
Root::Root(int& argc, char* argv[]) :
QGuiApplication(argc, argv)
{
}
Root::~Root() {
}
bool Root::notify(QObject* receiver, QEvent* e) {
try {
return QGuiApplication::notify(receiver, e);
} catch (const std::exception& e) {
std::cout << "Caught an exception, error message:\n" << e.what() << std::endl;
} catch (const int& e) {
std::cout << "Caught int exception: " << e << std::endl;
} catch (...) {
std::cout << "Caught an exception" << std::endl;
}
std::cout << "Squawk is quiting..." << std::endl;
exit(1);
return false;
}