diff -r 0b38fc5b94c6 -r 2c54b51f39c4 calendarui/application/src/main.cpp --- a/calendarui/application/src/main.cpp Mon Jul 12 02:32:28 2010 +0530 +++ b/calendarui/application/src/main.cpp Mon Jul 26 13:54:38 2010 +0530 @@ -15,45 +15,45 @@ * */ - +// system includes #include -#include -#include #include #include -#include "calencontroller.h" -#include "calenserviceprovider.h" +// user includes +#include "calenapplication.h" + +/*! + The main() function. - int main(int argc, char *argv[]) - { - HbApplication app(argc, argv); - - // Main window for providing the scene context + Responsible for constructing the CalenApplication object and showing the + main window. + */ +int main(int argc, char *argv[]) +{ + // Create and initialize an CalenApplication instance + QScopedPointer application( + new CalenApplication(argc, argv)); + //CalenApplication *application = new CalenApplication(argc, argv); + + // Main window for providing the scene context HbMainWindow window; - //For translation, loading and installing translator + //For translation, loading and installing translator HbTranslator translator("calendar"); translator.loadCommon(); - // Backup and restore code need to write here. + // Backup and restore code need to write here. - CCalenController *controller = new CCalenController(); + application->createController(); int retValue = 0; - if (controller) { - controller->constructController(); - // Create the Calendar service provider - CalenServiceProvider service(controller); - - retValue = app.exec(); - - // delete the controller - controller->ReleaseCustomisations(); - controller->Release(); - } - return retValue; - } + + retValue = application->execution(); + application->releaseController(); + + return retValue; +} +//End of file - //End of file