Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <csignal>
- #include <stdint.h>
- #include <QtGui/QApplication>
- #include "Core.h"
- void exitQt(CCore* core_IO)
- {
- qDebug("properly exit");
- core_IO->clean();
- QCoreApplication::exit(0);
- }
- int32_t main(int32_t argc, char *argv[])
- {
- registerMyTypes();
- QApplication a(argc, argv);
- CCore core;
- signal(SIGINT, &exitQt(&core));
- signal(SIGTERM, &exitQt(&core));
- signal(SIGKILL, &exitQt(&core)) ;
- return a.exec();
- }
Add Comment
Please, Sign In to add comment