equal
deleted
inserted
replaced
17 |
17 |
18 #include <hbapplication.h> |
18 #include <hbapplication.h> |
19 #include <hbmainwindow.h> |
19 #include <hbmainwindow.h> |
20 #include <QTranslator> |
20 #include <QTranslator> |
21 #include <QLocale> |
21 #include <QLocale> |
|
22 #include <QScopedPointer> |
22 #include "cntserviceproviderold.h" |
23 #include "cntserviceproviderold.h" |
23 #include "cntserviceproviderold2.h" |
24 #include "cntserviceproviderold2.h" |
24 #include "cntserviceproviderfetch.h" |
25 #include "cntserviceproviderfetch.h" |
25 #include "cntserviceproviderold2.h" |
26 #include "cntserviceproviderold2.h" |
26 #include "cntserviceproviderviewing.h" |
27 #include "cntserviceproviderviewing.h" |
32 #include "cntdebug.h" |
33 #include "cntdebug.h" |
33 #include <cntviewparams.h> |
34 #include <cntviewparams.h> |
34 |
35 |
35 int main(int argc, char **argv) |
36 int main(int argc, char **argv) |
36 { |
37 { |
|
38 #if defined (TRACES) || defined (TRACE2FILE) |
37 qInstallMsgHandler(MSG_HANDLER); |
39 qInstallMsgHandler(MSG_HANDLER); |
|
40 #endif |
38 |
41 |
39 HbApplication a( argc, argv ); |
42 HbApplication a( argc, argv ); |
40 |
43 |
41 QTranslator translator; |
44 QTranslator translator; |
42 QString lang = QLocale::system().name(); |
45 QString lang = QLocale::system().name(); |
56 |
59 |
57 // This object actually executes the services |
60 // This object actually executes the services |
58 CntServices* services = new CntServices(); |
61 CntServices* services = new CntServices(); |
59 services->setParent( &mainWindow ); // for ownership |
62 services->setParent( &mainWindow ); // for ownership |
60 |
63 |
61 CntServiceViewManager* viewManager = new CntServiceViewManager( |
64 QScopedPointer<CntServiceViewManager> viewManager(new CntServiceViewManager( |
62 &mainWindow, |
65 &mainWindow, |
63 *services ); // as CntAbstractServiceProvider |
66 *services )); // as CntAbstractServiceProvider |
64 viewManager->setViewNavigator( navigator ); |
67 viewManager->setViewNavigator( navigator ); |
65 |
68 |
66 //services->setViewManager( *viewManager ); |
|
67 services->setEngine( viewManager->engine() ); |
69 services->setEngine( viewManager->engine() ); |
68 |
70 |
69 // These objects talk with QT Highway (send/receive) |
71 // These objects talk with QT Highway (send/receive) |
70 CntServiceProviderOld* serviceProviderOld = new CntServiceProviderOld( *services, &mainWindow ); // com.nokia.services.phonebookservices.Fetch |
72 CntServiceProviderOld* serviceProviderOld = new CntServiceProviderOld( *services, &mainWindow ); // com.nokia.services.phonebookservices.Fetch |
71 CntServiceProviderOld2* serviceProviderOld2 = new CntServiceProviderOld2( *services, &mainWindow ); // phonebookservices.Fetch |
73 CntServiceProviderOld2* serviceProviderOld2 = new CntServiceProviderOld2( *services, &mainWindow ); // phonebookservices.Fetch |