Programatically generated slot names
Jeff Mitchell
mitchell at kde.org
Mon Feb 2 04:02:57 GMT 2009
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Olivier Goffart wrote:
>> Yeah, early on I tried removing SLOT from the name and simply prepending
>> "1" to the function name.
>
> That should have worked. (assuming the signature name was correct, with
> parenthesis and arguments)
So, this is a bit strange:
QString page( QString("1slotPage%1()").arg( m_pageNum ) );
1) QTimer::singleShot( 0, this, page.toAscii().constData() );
2) QMetaObject::invokeMethod( this, page.toAscii().constData() );
Given the above, #1 works, #2 doesn't. Anyone know why?
Thanks,
Jeff
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iEYEARECAAYFAkmGcGoACgkQANYdqNCuGCUiEACg1I1JffbDAIaV2IxnSV+HAy1s
llUAoIgzQQoEFpZ9rBqSiNGRMC3oD4Ve
=U4/5
-----END PGP SIGNATURE-----
More information about the kde-core-devel
mailing list