From kde-commits Sat Aug 18 12:35:12 2012 From: Shantanu Tushar Date: Sat, 18 Aug 2012 12:35:12 +0000 To: kde-commits Subject: [gluon/creator-distributionsupport-shreya] player/lib/models: Run a traversal after fetching comment Message-Id: <20120818123512.D2A3CA6094 () git ! kde ! org> X-MARC-Message: https://marc.info/?l=kde-commits&m=134529332513808 Git commit f1342f80a301d39ddaec434c625397620c449ac2 by Shantanu Tushar. Committed on 18/08/2012 at 14:34. Pushed by shantanu into branch 'creator-distributionsupport-shreya'. Run a traversal after fetching comments M +3 -2 player/lib/models/commentitemsmodel.cpp M +1 -1 player/lib/models/commentitemsmodel.h http://commits.kde.org/gluon/f1342f80a301d39ddaec434c625397620c449ac2 diff --git a/player/lib/models/commentitemsmodel.cpp b/player/lib/models/co= mmentitemsmodel.cpp index 41ae71f..91caf4e 100644 --- a/player/lib/models/commentitemsmodel.cpp +++ b/player/lib/models/commentitemsmodel.cpp @@ -116,9 +116,11 @@ void CommentItemsModel::processFetchedComments( Attica= ::BaseJob* job ) Attica::Comment p( commentsJob->itemList().at( i ) ); addComment( p, d->m_rootNode ); } + beginResetModel(); + treeTraversal(d->m_rootNode); + endResetModel(); = d->m_isOnline =3D true; - reset(); //Reset the model to notify views to reload comments } else { @@ -166,7 +168,6 @@ void CommentItemsModel::treeTraversal( GluonCore::Gluon= Object* obj ) GluonObject* gobj =3D qobject_cast( child ); if( gobj ) { - gobj->dumpObjectTree(); d->m_nodes.append( gobj ); treeTraversal( gobj ); } diff --git a/player/lib/models/commentitemsmodel.h b/player/lib/models/comm= entitemsmodel.h index 3a7f2c8..01c4c5a 100644 --- a/player/lib/models/commentitemsmodel.h +++ b/player/lib/models/commentitemsmodel.h @@ -56,7 +56,7 @@ namespace GluonPlayer { Q_OBJECT public: - enum Column + enum Roles { AuthorRole =3D Qt::UserRole, TitleRole,