CMake project reloading.

Andreas Pakulat apaku at gmx.de
Wed Feb 3 15:56:06 UTC 2010


On 03.02.10 19:07:10, Olivier J. G. wrote:
> > I never was fond of that reload method, IMHO the project managers should be
> > able to better keep track of things. So if a file X is deleted and removed
> > from the cmakelists.txt, they wouldn't just drop the whole folder from the
> > model. Instead they'd parse the updated file and generate some kind of
> > "difference" between the old and the new state and apply the necessary
> > deletions/additions of subitems only. Yes this is more complex than a
> > complete reload, but its (IMHO) also the "right way" to do it.
> 
> Ref-counted or not, it seems dreadfully obvious now that these items
> shouldn't be tied to the TreeView.
> That is, the ProjectItem should be it's own entity, not a
> QStandardItem derivative.

What exactly do you mean with "not be tied to the treeview" and "not a
qstandarditem derivative"?

> In this way, the "right way" isn't so far
> off, just the "diffing" would happen on a different level.
> When CMakeLists is changed, the manager could generate a new set of
> ProjectItems based on it, and compare that with the existing set.
> Changing the references, deleting and adding as needed. The tree would
> then become a client of the project model instead of the master of it.

Sorry, but I can't follow you on that last one, how is the tree a "master"
of the model?

Andreas

-- 
You will be a winner today.  Pick a fight with a four-year-old.




More information about the KDevelop-devel mailing list