[Kget] Refactor transferhandler & transfergrouphandler?

Carsten Pfeiffer pfeiffer at kde.org
Wed Aug 13 15:09:04 CEST 2008


Am Donnerstag, 14. August 2008 schrieb Lukas Appelhans:

> If it works it would be great, till now I thought:
> dynamic_cast<TransferHandlerBase*>(grouphandler);
> ->valid!

Upcasting is not necessary. You can safely do
TransferHandlerBase *base = groupHandler;
without any cast at all.

> dynamic_cast<TransferGroupHandler*>(handler);
> ->invalid/compile error!

There must be some mistake then... See attached example.
(g++ main.cpp && ./a.out)

Cheers,
Carsten
-------------- next part --------------
A non-text attachment was scrubbed...
Name: main.cpp
Type: text/x-c++src
Size: 602 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/kget/attachments/20080813/204be460/attachment.bin 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 447 bytes
Desc: This is a digitally signed message part.
Url : http://mail.kde.org/pipermail/kget/attachments/20080813/204be460/attachment.pgp 


More information about the Kget mailing list