daily pastebin goal
67%
SHARE
TWEET

Untitled

a guest Feb 20th, 2018 57 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2. #include <csignal>
  3. #include <stdint.h>
  4. #include <QtGui/QApplication>
  5. #include "Core.h"
  6.  
  7. void exitQt(CCore* core_IO)
  8. {
  9.     qDebug("properly exit");
  10.     core_IO->clean();
  11.     QCoreApplication::exit(0);
  12. }
  13.  
  14.  
  15. int32_t main(int32_t argc, char *argv[])
  16. {
  17.     registerMyTypes();
  18.  
  19.     QApplication a(argc, argv);
  20.  
  21.     CCore core;
  22.  
  23.     signal(SIGINT, &exitQt(&core));
  24.     signal(SIGTERM, &exitQt(&core));
  25.     signal(SIGKILL, &exitQt(&core)) ;
  26.  
  27.  
  28.     return a.exec();
  29. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top