blob: cd2a4b66469ca5c0da91b38547d8075f49781a91 [file] [log] [blame]
Alexandre Lision8af73cb2013-12-10 14:11:20 -05001// 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
12using namespace bb::cascades;
13
14Q_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}