[RFC] Workingstyle of different VCS systems

Andras Mantia amantia at kde.org
Fri Apr 13 06:34:32 UTC 2007


On Friday 13 April 2007, Andreas Pakulat wrote:
> You seem to have missed some mails in the thread. We want to provide
> some widgets that can be shared among vcs plugins, like a  logviewer
> a diff-tool and a merge tool for example. That way we have a unified
> GUI for all these things, we reduce code duplication and take some
> burden from plugin developers.

This is an idea I do not oppose at all. They can be in a common library 
as well, but not necessary in the interfaces. KDevelop interfaces are 
usually classes with pure virtual methods, and their objective is to 
provide a common way to access different classes in behavior.
Now if you put the logviewer directly in the interface (e.g in the "log" 
method of the interface), will just complicate the life of the vcs 
plugin developer. So I suggest to have:
- interface classes for those methods that are useful to be called from 
code/script
- a vcs/scm library having the common widgets, methods. It can also have 
methods to return the common KAction's, so you will have consistent 
names for the vcs actions and they need to be translated only once.

> I'm not sure the framework knows when the user pressed save, but if
> we do than thats right.

In Quanta we had to use our own save method because katepart behaves 
differently in case of local and remote files (I don't know how this is 
in KDE4).  For local files the saveAs waits until the save is done and 
returns true/false depending on success/failure, but in case of remote 
files the saveAs method is asynchronous and the status of the save is 
known only when a certain signal is emitted by the katepart. The way to 
intercept save/saveAs from the KTextEditor and connect it to the 
paltform's actions is relatively simple:
- take the certain action for the actioncollection of the editor part
- connect the KStdAction::save and KStdAction::saveAs to the platform's 
save slots. 

Andras



-- 
Quanta Plus developer - http://quanta.kdewebdev.org
K Desktop Environment - http://www.kde.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20070413/01356b9d/attachment.sig>


More information about the KDevelop-devel mailing list