QTfrontend/HWApplication.cpp
changeset 8708 6354b01d5500
parent 8610 6d6b5b529890
child 8710 8d0a150d42c2
equal deleted inserted replaced
8707:404c18aed69f 8708:6354b01d5500
    19 #include "HWApplication.h"
    19 #include "HWApplication.h"
    20 #include <QFileOpenEvent>
    20 #include <QFileOpenEvent>
    21 
    21 
    22 #include "hwform.h"
    22 #include "hwform.h"
    23 
    23 
       
    24 #if !defined(Q_WS_WIN)
       
    25 void terminateFrontend(int signal)
       
    26 {
       
    27     Q_UNUSED(signal);
       
    28     QCoreApplication::exit(0);
       
    29 }
       
    30 #endif
       
    31 
    24 HWApplication::HWApplication(int &argc,  char **argv):
    32 HWApplication::HWApplication(int &argc,  char **argv):
    25     QApplication(argc, argv)
    33     QApplication(argc, argv)
    26 {
    34 {
    27 
    35 #if !defined(Q_WS_WIN)
       
    36     signal(SIGINT, &terminateFrontend);
       
    37 #endif
    28 }
    38 }
    29 
    39 
    30 bool HWApplication::event(QEvent *event)
    40 bool HWApplication::event(QEvent *event)
    31 {
    41 {
    32     QFileOpenEvent *openEvent;
    42     QFileOpenEvent *openEvent;