20 #include "clockcommon.h" |
20 #include "clockcommon.h" |
21 #include "clockmainview.h" |
21 #include "clockmainview.h" |
22 #include "clockwidget.h" |
22 #include "clockwidget.h" |
23 #include "clockworldview.h" |
23 #include "clockworldview.h" |
24 #include "clockhomecityitem.h" |
24 #include "clockhomecityitem.h" |
|
25 #include "OstTraceDefinitions.h" |
|
26 #ifdef OST_TRACE_COMPILER_IN_USE |
|
27 #include "clockdocloaderTraces.h" |
|
28 #endif |
|
29 |
25 |
30 |
26 /*! |
31 /*! |
27 \class ClockDocLoader |
32 \class ClockDocLoader |
28 |
33 |
29 Inherits from HbDocumentLoader |
34 Inherits from HbDocumentLoader |
35 |
40 |
36 \return QObject* Pointer to the created object |
41 \return QObject* Pointer to the created object |
37 */ |
42 */ |
38 QObject *ClockDocLoader::createObject(const QString &type, const QString &name) |
43 QObject *ClockDocLoader::createObject(const QString &type, const QString &name) |
39 { |
44 { |
|
45 OstTraceFunctionEntry0( CLOCKDOCLOADER_CREATEOBJECT_ENTRY ); |
40 if (CLOCK_MAIN_VIEW == name) { |
46 if (CLOCK_MAIN_VIEW == name) { |
41 QObject *object = new ClockMainView(); |
47 QObject *object = new ClockMainView(); |
42 object->setObjectName(name); |
48 object->setObjectName(name); |
|
49 OstTraceFunctionExit0( CLOCKDOCLOADER_CREATEOBJECT_EXIT ); |
43 return object; |
50 return object; |
44 } else if (CLOCK_WIDGET == name) { |
51 } else if (CLOCK_WIDGET == name) { |
45 QObject *object = new ClockWidget(); |
52 QObject *object = new ClockWidget(); |
46 object->setObjectName(name); |
53 object->setObjectName(name); |
|
54 OstTraceFunctionExit0( DUP1_CLOCKDOCLOADER_CREATEOBJECT_EXIT ); |
47 return object; |
55 return object; |
48 } else if (CLOCK_WORLD_VIEW == name) { |
56 } else if (CLOCK_WORLD_VIEW == name) { |
49 QObject *object = new ClockWorldView(); |
57 QObject *object = new ClockWorldView(); |
50 object->setObjectName(name); |
58 object->setObjectName(name); |
|
59 OstTraceFunctionExit0( DUP2_CLOCKDOCLOADER_CREATEOBJECT_EXIT ); |
51 return object; |
60 return object; |
52 } else if (CLOCK_WORLD_HOMECITY == name) { |
61 } else if (CLOCK_WORLD_HOMECITY == name) { |
53 QObject *object = new ClockHomeCityItem(); |
62 QObject *object = new ClockHomeCityItem(); |
54 object->setObjectName(name); |
63 object->setObjectName(name); |
|
64 OstTraceFunctionExit0( DUP3_CLOCKDOCLOADER_CREATEOBJECT_EXIT ); |
55 return object; |
65 return object; |
56 } |
66 } |
57 |
67 |
58 return HbDocumentLoader::createObject(type, name); |
68 return HbDocumentLoader::createObject(type, name); |
59 } |
69 } |