KConfigSkeleton::usrWriteConfig()

Thomas Zander zander at kde.org
Sun Apr 22 14:07:48 BST 2007


On Sunday 22 April 2007 13:35, Cornelius Schumacher wrote:
> Second this is a cause for subtle errors as it's easy to forget or not
> know in the first place, that a reimplementation has to call the base
> class implementation there, especially as it's not documented.

Actually, I disagree there; calling the super implementation is the 
default behavior people learn out of school and only when the 
documentation says its empty can you consider not doing that.
But in general you want to call the virtual function you are overriding.

For example I found that QUndoCommand::undo() (and redo()) should be 
reimplemented, but you _have_ to call the super or otherwise the macro 
functionality doesn't work.

I guess this comes down to what experience you have with designing things; 
I, for one, think that the reason things broke for you was due to kdepim 
not following good design principles.  Instead of due to a behavioral 
change in KDELibs.
-- 
Thomas Zander
-------------- 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/kde-core-devel/attachments/20070422/7fa17da9/attachment.sig>


More information about the kde-core-devel mailing list