[KDev4] let's clearify VCS interfaces

Andreas Pakulat apaku at gmx.de
Sun Apr 1 09:57:35 UTC 2007


On 01.04.07 02:20:16, dukju ahn wrote:
> Current VCS interface is good but IMHO needs some modifications.
> 
> 1. Use QMap instead of QList for VcsFileInfo

Why? The VcsFileInfo class already contains the url

> Currently statusSync() and statusASync() both return QList<VcsFileInfo>
> But what is the purpose of these methods? It is to retrieve any file/dir's
> status easily. If we only have QList, we should iterate all the way
> to retrieve some specific file/dir's status

Well, I'd like to see if we can remove that class completely, because it
makes our interface not an abstract interface anymore, but a real class.
Also this method is not meant to find the status for a specific file, as
far as I can see. It seems to be for getting the status of a whole dir
and all files in there to reduce the amount of function calls when
retrieving the initial status for a project tree.

> 2. Allow statusSync() and statusASync() to be called on file.
> 
> Currently, the argument to these method is KUrl &dirPath.
> To retrieve the status of one file, one should find file's parent path
> But it would be efficient if the caller can specify filename directly.

But then 1. is totally bogus, because if you want to know the status of
a specific file you can use this overload.

> 3. Don't return reference which is Out-Of-Bound.

What do you mean, out-of-bounds?

Andreas

-- 
Give him an evasive answer.




More information about the KDevelop-devel mailing list