From kde-core-devel Sun Mar 05 16:50:45 2006 From: Thiago Macieira Date: Sun, 05 Mar 2006 16:50:45 +0000 To: kde-core-devel Subject: Re: Proposing the removal of virtual_hooks (or how you can add a Message-Id: <200603051750.53154.thiago () kde ! org> X-MARC-Message: https://marc.info/?l=kde-core-devel&m=114157750123450 MIME-Version: 1 Content-Type: multipart/mixed; boundary="--nextPart1419147.fBRxheGGEh" --nextPart1419147.fBRxheGGEh Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline =46rans Englich wrote: >On Saturday 04 March 2006 11:18, Thiago Macieira wrote: >> I'd like to propose a change of policy in the KDE libraries: remove >> all virtual_hook functions from QObject-derived classes. >> >> The reason for that is that we *already* have a virtual_hook function >> in those classes and it's called qt_metacall. It's automatically >> generated by moc, so we're safe that it'll always exist. > >Another way to preserve BC is to use the visitor/double dispatch > pattern. It can be argued to be a bit heavy code-wise, but achieves the > goal and can also be fast, depending on various factors. Major > pros/cons: Would you mind elaborate on what that is? =2D-=20 Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org PGP/GPG: 0x6EF45358; fingerprint: E067 918B B660 DBD1 105C 966C 33F5 F005 6EF4 5358 5. Swa he g=C3=A9anhwearf t=C3=B3 timbran, and hwonne he c=C3=B3m, l=C3=A1!= Unix cw=C3=A6=C3=B0 "Hello,=20 World". =C7=BCfre =C7=BDghwilc w=C3=A6s gl=C3=A6d and seo woruld w=C3=A6s f= r=C3=A9o. --nextPart1419147.fBRxheGGEh Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2.1 (GNU/Linux) iD8DBQBECxbtM/XwBW70U1gRAgMpAKC8mp7xrusLhKKA839EAsqv43pUVACgjEJT 4AhQCPtCIB1yza0yladhROU= =AHMa -----END PGP SIGNATURE----- --nextPart1419147.fBRxheGGEh--