KTabBar -- double clicking on empty space

Constantin Berzan exit3219 at gmail.com
Sun Sep 9 17:40:14 BST 2007


On Sunday 09 September 2007 15:59, Richard Moore wrote:
> On 9/9/07, Thomas Zander <zander at kde.org> wrote:
> > The disadvantage of this is that all code listening to that signal need
> > to special-case the magic number "-1".
> > Which is sub-optimal because it adds complexity to the 'API' where you
> > don't expect it.
>
> Yes, and any existing code that is using that index could be broken in
> hard to find ways. I'd say having a new signal is a much cleaner
> design.

Having mouseDoubleClick(-1) makes sense.  If we create a separate signal for 
the empty tab area, then mouseDoubleClick() should be renamed to something 
like tabDoubleClick() to keep the semantics accurate and obvious (unless the 
new signal will be called mouseDoubleClick(void) as in KTabWidget).
Same thing for MiddleClick if we decide that middle-clicking the empty space 
is worth signalling.



-- 
Read my book!
http://ascending.wordpress.com/2007/08/05/diaries-of-the-last-dreamer/




More information about the kde-core-devel mailing list