Alexandre Lision | 8af73cb | 2013-12-10 14:11:20 -0500 | [diff] [blame] | 1 | // Default empty project template |
| 2 | #include <bb/cascades/Application> |
| 3 | |
| 4 | #include <QLocale> |
| 5 | #include <QTranslator> |
| 6 | #include "applicationui.h" |
| 7 | |
| 8 | // include JS Debugger / CS Profiler enabler |
| 9 | // this feature is enabled by default in the debug build only |
| 10 | #include <Qt/qdeclarativedebug.h> |
| 11 | |
| 12 | using namespace bb::cascades; |
| 13 | |
| 14 | Q_DECL_EXPORT int main(int argc, char **argv) |
| 15 | { |
| 16 | // this is where the server is started etc |
| 17 | Application app(argc, argv); |
| 18 | |
| 19 | // localization support |
| 20 | QTranslator translator; |
| 21 | QString locale_string = QLocale().name(); |
| 22 | QString filename = QString( "PjsuaBB_%1" ).arg( locale_string ); |
| 23 | if (translator.load(filename, "app/native/qm")) { |
| 24 | app.installTranslator( &translator ); |
| 25 | } |
| 26 | |
| 27 | new ApplicationUI(&app); |
| 28 | |
| 29 | // we complete the transaction started in the app constructor and start the client event loop here |
| 30 | return Application::exec(); |
| 31 | // when loop is exited the Application deletes the scene which deletes all its children (per qt rules for children) |
| 32 | } |