Virtual methods in KLineEdit

Christian Schaarschmidt schaarsc at
Sat Jan 27 13:53:32 GMT 2007

Am Dienstag, 23. Januar 2007 22:58 schrieb Olivier Goffart:
> Le mardi 23 janvier 2007 19:38, Christian Schaarschmidt a écrit :
> > Hi,
> >
> > I have recently commited a change to trunk/.../KLineEdit (bug 137430) and
> > after that I had a discussion with Simon concerning virtual methods.
> > Since we could not agree upon a solution it would be nice to get some
> > other opinions...
> >
> > Problem: Allow subclasses of KLineEdit to extend context menu
> > The patch solves the issue by moving the code to
> > createStandardContextMenu(), remains the question: should KLineEdit be
> > used as base for a hierarchy? How comfortable should it be?
> If you choose to have the virtual method,  i think that
> createStandardContextMenu is not a good name for the following reason:
>  - It's not really standard for the sublass (i mean that
> KFooApplicationSuperLineEdit cannot say his menu will be standard)
>  - It's confusing with the Qt method which is not virtual
> So i suggest simply "createContextMenu"
this sounds like a reasonable suggestion.
since there were no more comments on this issue I'll do that.


More information about the kde-core-devel mailing list