emailuis/nmailui/src/nmmailboxlistview.cpp
changeset 48 10eaf342f539
parent 47 f83bd4ae1fe3
--- a/emailuis/nmailui/src/nmmailboxlistview.cpp	Thu Jun 24 14:32:18 2010 +0300
+++ b/emailuis/nmailui/src/nmmailboxlistview.cpp	Tue Jun 29 17:12:28 2010 +0300
@@ -77,16 +77,20 @@
 {
     NM_FUNCTION;
     
+
     // Use document loader to load the view
-    bool ok(false);
-    setObjectName(QString(NMUI_MAILBOX_LIST_VIEW));
-    // Pass the view to documentloader. Document loader uses this view
-    // when docml is parsed, instead of creating new view.
-    if (mDocumentLoader) {
-        mWidgetList = mDocumentLoader->load(NMUI_MAILBOX_LIST_VIEW_XML, &ok);
-    }
+     bool ok(false);
+     setObjectName(QString(NMUI_MAILBOX_LIST_VIEW));
+     QObjectList objectList;
+     objectList.append(this);
+     // Pass the view to documentloader. Document loader uses this view
+     // when docml is parsed, instead of creating new view.
+     if (mDocumentLoader) {
+         mDocumentLoader->setObjectTree(objectList);
+         mWidgetList = mDocumentLoader->load(NMUI_MAILBOX_LIST_VIEW_XML, &ok);
+     }
 
-    if (ok == true && mWidgetList.count()) {
+    if (ok) {
         // Create item context menu
         mItemContextMenu = new HbMenu();
         // Get mailbox widget pointer and set parameters