From kde-commits Mon Jun 30 22:51:40 2014 From: Dominik Haumann Date: Mon, 30 Jun 2014 22:51:40 +0000 To: kde-commits Subject: Re: [kate/frameworks] addons/filetree: Do not reset the model without need Message-Id: <1602509.06Dgibzkym () eriador> X-MARC-Message: https://marc.info/?l=kde-commits&m=140416880017683 On Monday 30 June 2014 18:21:02 Albert Astals Cid wrote: > Git commit c5bd55745ed68ecd48b52908c004865d01522c6c by Albert Astals Cid. > Committed on 30/06/2014 at 18:20. > Pushed by aacid into branch 'frameworks'. > > Do not reset the model without need Thanks, Albert, for taking care of this. > >From reading the code i see no need to reset the model, the only think that > >i see the reset do is cause the view to "reset" too and the state of > >open/closed roots in the tree gets broken. > Used it for a few minutes and everything worked fine. Reading the code don't > see why it shouldn't. I'll it use it a bit more for a few more days. > > BUGS: 332990 > > M +0 -4 addons/filetree/katefiletreemodel.cpp > > http://commits.kde.org/kate/c5bd55745ed68ecd48b52908c004865d01522c6c > > diff --git a/addons/filetree/katefiletreemodel.cpp > b/addons/filetree/katefiletreemodel.cpp index 512392a..0489b3e 100644 > --- a/addons/filetree/katefiletreemodel.cpp > +++ b/addons/filetree/katefiletreemodel.cpp > @@ -687,8 +687,6 @@ void > KateFileTreeModel::documentOpened(KTextEditor::Document *doc) > > void KateFileTreeModel::documentsOpened(const QList > &docs) { > - beginResetModel(); > - > foreach (KTextEditor::Document *doc, docs) { > if (m_docmap.contains(doc)) { > documentNameChanged(doc); > @@ -696,8 +694,6 @@ void KateFileTreeModel::documentsOpened(const > QList &doc documentOpened(doc); > } > } > - > - endResetModel(); > } > > void KateFileTreeModel::documentModifiedChanged(KTextEditor::Document *doc)