emailuis/nmailui/src/nmmailboxlistview.cpp
changeset 48 10eaf342f539
parent 47 f83bd4ae1fe3
equal deleted inserted replaced
47:f83bd4ae1fe3 48:10eaf342f539
    75 */
    75 */
    76 void NmMailboxListView::loadViewLayout()
    76 void NmMailboxListView::loadViewLayout()
    77 {
    77 {
    78     NM_FUNCTION;
    78     NM_FUNCTION;
    79     
    79     
       
    80 
    80     // Use document loader to load the view
    81     // Use document loader to load the view
    81     bool ok(false);
    82      bool ok(false);
    82     setObjectName(QString(NMUI_MAILBOX_LIST_VIEW));
    83      setObjectName(QString(NMUI_MAILBOX_LIST_VIEW));
    83     // Pass the view to documentloader. Document loader uses this view
    84      QObjectList objectList;
    84     // when docml is parsed, instead of creating new view.
    85      objectList.append(this);
    85     if (mDocumentLoader) {
    86      // Pass the view to documentloader. Document loader uses this view
    86         mWidgetList = mDocumentLoader->load(NMUI_MAILBOX_LIST_VIEW_XML, &ok);
    87      // when docml is parsed, instead of creating new view.
    87     }
    88      if (mDocumentLoader) {
    88 
    89          mDocumentLoader->setObjectTree(objectList);
    89     if (ok == true && mWidgetList.count()) {
    90          mWidgetList = mDocumentLoader->load(NMUI_MAILBOX_LIST_VIEW_XML, &ok);
       
    91      }
       
    92 
       
    93     if (ok) {
    90         // Create item context menu
    94         // Create item context menu
    91         mItemContextMenu = new HbMenu();
    95         mItemContextMenu = new HbMenu();
    92         // Get mailbox widget pointer and set parameters
    96         // Get mailbox widget pointer and set parameters
    93         mMailboxListWidget = qobject_cast<HbListView *>
    97         mMailboxListWidget = qobject_cast<HbListView *>
    94             (mDocumentLoader->findWidget(NMUI_MAILBOX_LIST_WIDGET));
    98             (mDocumentLoader->findWidget(NMUI_MAILBOX_LIST_WIDGET));