diff -r fd30d51f876b -r b6db4fd4947b calendarui/application/src/main.cpp --- a/calendarui/application/src/main.cpp Mon May 03 12:30:32 2010 +0300 +++ b/calendarui/application/src/main.cpp Mon Jun 28 15:22:02 2010 +0530 @@ -17,10 +17,10 @@ #include -#include #include -#include -#include +#include +#include +#include #include "calencontroller.h" #include "calenserviceprovider.h" @@ -31,33 +31,27 @@ // Main window for providing the scene context HbMainWindow window; - window.setRenderHints( - QPainter::Antialiasing | QPainter::SmoothPixmapTransform); - window.setViewportUpdateMode(QGraphicsView::MinimalViewportUpdate); //For translation, loading and installing translator - QTranslator translator; - QString lang = QLocale::system().name(); - QString path = "Z:/resource/qt/translations/"; - // TODO: Load the appropriate .qm file based on locale - //bool loaded = translator.load("calendar_" + lang, path); - bool loaded = translator.load("calendar_en_GB",":/translations"); - app.installTranslator(&translator); - - //Backup and restore code need to write here. + HbTranslator translator("calendar"); + translator.loadCommon(); + + // Backup and restore code need to write here. - // Check if calendar is launched thru XQService framework - bool isFromServiceFrmwrk = XQServiceUtil::isService(); - CCalenController *controller = new CCalenController(isFromServiceFrmwrk); + CCalenController *controller = new CCalenController(); + + int retValue = 0; + if (controller) { + controller->constructController(); + // Create the Calendar service provider + CalenServiceProvider service(controller); - // Create the Calendar service provider - CalenServiceProvider service(controller); + retValue = app.exec(); - int retValue = app.exec(); - - // delete the controller - controller->Release(); - + // delete the controller + controller->ReleaseCustomisations(); + controller->Release(); + } return retValue; }