[Kde-perl] Signals & Slots

Germain Garand germain at ebooksfrance.org
Fri Jun 6 04:06:31 CEST 2003


Le Vendredi 06 Juin 2003 02:02, Ashley Winters a écrit :

> I like the SIGNAL( int ) syntax, but I'll probably want to have a named
> signal interface anyways, since Perl doesn't support overloading on
> parameters... SLOT( resize(int, int) ) vs. SLOT( resize(const QSize &)
> ). However, I much prefer SLOT( const QSize & ). :)

mmh, I'm afraid I don't understand what you mean.

In the current implementation, 
    sub foo : SLOT( int )
declares the slot
   'foo(int)'

So what's the benefit of supplying a name?

Having the syntactical ability to declare:

    sub bar : SLOT( foo( int ) ) {}
    sub boz : SLOT( foo( int, const QSize &) ) {}

looks rather more confusing to me than

   sub foo : SLOT( int ) {}
   sub bar : SLOT( int, const QSize &) ) {}

G.


More information about the Kde-perl mailing list