From kde-core-devel Tue Aug 21 15:42:11 2007 From: Thomas McGuire Date: Tue, 21 Aug 2007 15:42:11 +0000 To: kde-core-devel Subject: Re: [PATCH] New signal for KKeySequenceWidget Message-Id: <200708211742.11602.thomas.mcguire () gmx ! net> X-MARC-Message: https://marc.info/?l=kde-core-devel&m=118771101831012 Hi, On Tuesday 21 August 2007, Andreas Hartmetz wrote: > On Monday 20 August 2007 22:43:42 Thomas McGuire wrote: > > > > attached a patch which adds a new signal to KKeySequenceWidget. This > > signal is like the existing keySequenceChanged() signal, just with more > > parameters. > > > I'd rather have a virtual validate() function that can be reimplemented, > see http://doc.trolltech.com/qq/qq13-apis.html#staticpolymorphism. > OTOH it could be argued that breaking static polymorphism (interesting > term) is worth it if not breaking it means too much of a hassle for API > users. Either side has a valid argument, so - anybody else want to comment? I'd say the validate method is too much hassle for API users. That would mean to create a new class that inherits KKeySequenceWidget every time I use it. Furthermore, there is one place where KKeySequenceWidget is used inside an UI file, changing that would be even more inconvenient. So I vote for the new signal, because it minimizes porting work. Regards, Thomas