# HG changeset patch # User martin_bede # Date 1357164794 -3600 # Node ID df0ea4323295ea4e5b5d7a1e5f6bebabc7f84040 # Parent c23bd7ee9a5e60406ac94853c64ea476be7746fd GCI2012: Unix Qt Signals diff -r c23bd7ee9a5e -r df0ea4323295 QTfrontend/main.cpp --- a/QTfrontend/main.cpp Wed Jan 02 12:39:50 2013 +0100 +++ b/QTfrontend/main.cpp Wed Jan 02 23:13:14 2013 +0100 @@ -39,9 +39,11 @@ #ifdef _WIN32 #include +#elif defined __APPLE__ +#include "CocoaInitializer.h" #endif -#ifdef __APPLE__ -#include "CocoaInitializer.h" +#ifndef _WIN32 +#include #endif @@ -87,6 +89,12 @@ else season = SEASON_NONE; } +#ifndef _WIN32 +void terminateFrontend(int signal) +{ + QCoreApplication::exit(0); +} +#endif bool checkForDir(const QString & dir) { @@ -136,6 +144,10 @@ atexit(releaseCocoaPool); #endif +#ifndef _WIN32 + signal(SIGINT, &terminateFrontend); +#endif + HWApplication app(argc, argv); QLabel *splash = NULL;