iproject API
Matt Rogers
mattr at kde.org
Tue Jul 29 00:38:24 UTC 2008
On Jul 28, 2008, at 12:30 AM, Andreas Pakulat wrote:
> 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.
>
IIRC, it was solely for scripting support, from the commandline, I
suppose.
> 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?
>
> Andreas
>
> --
> You never know how many friends you have until you rent a house on
> the beach.
>
> _______________________________________________
> KDevelop-devel mailing list
> KDevelop-devel at kdevelop.org
> https://barney.cs.uni-potsdam.de/mailman/listinfo/kdevelop-devel
Matt
More information about the KDevelop-devel
mailing list