iproject API

Andreas Pakulat apaku at gmx.de
Mon Jul 28 05:30:05 UTC 2008

On 27.07.08 23:25:24, Aleix wrote:
> Hi,
> I was looking at the KDevelop::IProject class and I find some things strange:
> - virtual IPlugin* versionControlPlugin() const:
> Is it being used at all? If we have this, why do we have all this mess
> of items when right-clicking on an item in the project model view?

Access to the VC plugin of a project is needed, even if not used right
now. Think about plugins doing refactoring/file-renaming, those need to
check for VC plugin.

> - Aren't redundant these methods?
>     virtual int fileCount() const = 0;
>     virtual ProjectFileItem* fileAt( int ) const = 0;
>     virtual QList<ProjectFileItem*> files() const = 0;
> And if not, is it that useful?

There once was a page on our wiki talking about the first two methods
being "the right API" and the latter being not so good. I can't find it
right now and I've already forgot the reasoning.

According to a quick grep the QList<> version is used quite a bit. I'm
not sure what to do, can somebody else shed some light on why the first
two methods are better API than the latter?


You never know how many friends you have until you rent a house on the beach.

More information about the KDevelop-devel mailing list