emailuis/nmailui/src/nmmessagelistview.cpp
changeset 48 10eaf342f539
parent 47 f83bd4ae1fe3
child 51 d845db10c0d4
equal deleted inserted replaced
47:f83bd4ae1fe3 48:10eaf342f539
    90     NM_FUNCTION;
    90     NM_FUNCTION;
    91 
    91 
    92     // Use document loader to load the view
    92     // Use document loader to load the view
    93     bool ok(false);
    93     bool ok(false);
    94     setObjectName(QString(NMUI_MESSAGE_LIST_VIEW));
    94     setObjectName(QString(NMUI_MESSAGE_LIST_VIEW));
       
    95     QObjectList objectList;
       
    96     objectList.append(this);
    95     // Pass the view to documentloader. Document loader uses this view
    97     // Pass the view to documentloader. Document loader uses this view
    96     // when docml is parsed, instead of creating new view.
    98     // when docml is parsed, instead of creating new view.
    97     if (mDocumentLoader) {
    99     if (mDocumentLoader) {
       
   100         mDocumentLoader->setObjectTree(objectList);
    98         mWidgetList = mDocumentLoader->load(NMUI_MESSAGE_LIST_VIEW_XML, &ok);
   101         mWidgetList = mDocumentLoader->load(NMUI_MESSAGE_LIST_VIEW_XML, &ok);
    99     }
   102     }
   100 
   103 
   101     if (ok == true && mWidgetList.count()) {
   104     if (ok) {
   102         // Get message list widget
   105         // Get message list widget
   103         mMessageListWidget = qobject_cast<HbTreeView *>
   106         mMessageListWidget = qobject_cast<HbTreeView *>
   104             (mDocumentLoader->findWidget(NMUI_MESSAGE_LIST_TREE_LIST));
   107             (mDocumentLoader->findWidget(NMUI_MESSAGE_LIST_TREE_LIST));
   105 
   108 
   106         if (mMessageListWidget) {
   109         if (mMessageListWidget) {