equal
deleted
inserted
replaced
38 */ |
38 */ |
39 QObject *NmUiDocumentLoader::createObject(const QString& type, const QString &name) |
39 QObject *NmUiDocumentLoader::createObject(const QString& type, const QString &name) |
40 { |
40 { |
41 NM_FUNCTION; |
41 NM_FUNCTION; |
42 |
42 |
43 QObject *res = NULL; |
43 QObject *res(NULL); |
44 if( type == NmMailViewerWK::staticMetaObject.className() ) { |
44 if( type == NmMailViewerWK::staticMetaObject.className() ) { |
45 res = new NmMailViewerWK(); |
45 res = new NmMailViewerWK(); |
46 res->setObjectName(name); |
46 res->setObjectName(name); |
47 } |
47 } |
48 if( type == NmBaseViewScrollArea::staticMetaObject.className() ) { |
48 if( type == NmBaseViewScrollArea::staticMetaObject.className() ) { |
55 } |
55 } |
56 if( type == NmAttachmentListWidget::staticMetaObject.className() ) { |
56 if( type == NmAttachmentListWidget::staticMetaObject.className() ) { |
57 res = new NmAttachmentListWidget(); |
57 res = new NmAttachmentListWidget(); |
58 res->setObjectName(name); |
58 res->setObjectName(name); |
59 } |
59 } |
60 if (res == NULL) { |
60 if (!res) { |
61 res = HbDocumentLoader::createObject(type, name); |
61 res = HbDocumentLoader::createObject(type, name); |
62 } |
62 } |
63 return res; |
63 return res; |
64 } |
64 } |