equal
deleted
inserted
replaced
13 * |
13 * |
14 * Description: |
14 * Description: |
15 * |
15 * |
16 */ |
16 */ |
17 |
17 |
|
18 #include <eikenv.h> |
18 #include <QMessageBox> |
19 #include <QMessageBox> |
19 |
20 |
20 #include "application.h" |
21 #include "application.h" |
21 #include "enginewrapper.h" |
22 #include "enginewrapper.h" |
22 #include "mainwindow.h" |
23 #include "mainwindow.h" |
31 { |
32 { |
32 QMessageBox::critical(0, QObject::tr("Error"), QObject::tr("Unable to initialize engine. Application will now quit.")); |
33 QMessageBox::critical(0, QObject::tr("Error"), QObject::tr("Unable to initialize engine. Application will now quit.")); |
33 return 1; |
34 return 1; |
34 } |
35 } |
35 |
36 |
|
37 // set as system application to prevent getting shut down events |
|
38 CEikonEnv::Static()->SetSystem( ETrue ); |
|
39 |
36 MainWindow window(engine); |
40 MainWindow window(engine); |
37 window.show(); |
41 window.show(); |
38 |
42 |
39 DataPopup dataPopup(engine); |
43 DataPopup dataPopup(engine, window); |
40 |
|
41 QObject::connect(&app, SIGNAL(foregroundEvent(bool)), |
|
42 &dataPopup, SLOT(updateVisibility(bool))); |
|
43 |
44 |
44 // TODO: pass false if run in background |
45 // TODO: pass false if run in background |
45 dataPopup.updateVisibility(true); |
46 dataPopup.updateVisibility(true); |
46 |
47 |
47 return app.exec(); |
48 return app.exec(); |