[KDev4] let's clearify VCS interfaces

Matt Rogers mattr at kde.org
Mon Apr 2 16:18:29 UTC 2007


On Sunday 01 April 2007 04:20, dukju ahn wrote:
> Hi,
>
> Current VCS interface is good but IMHO needs some modifications.
>
> 1. Use QMap instead of QList for VcsFileInfo
>
> 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
>
> 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.
>
> 3. Don't return reference which is Out-Of-Bound.
>
> In summary rather than,,
> virtual const QList<VcsFileInfo>&
> statusSync(const KUrl &dirPath, WorkingMode mode ) = 0;
>
> I propose
> virtual bool statusSync( QMap<KUrl, VcsFileInfo> &, //output
>                                 KUrl &dirPath,                     //input

"const KUrl&" instead of "KUrl&"
>                                 WorkingMode mode ) = 0;   // input
>

-- 
Matt
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20070402/1cdfb678/attachment.sig>


More information about the KDevelop-devel mailing list