[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: Re: playground/pim/kblogger/src
From: Marc Mutz <marc () klaralvdalens-datakonsult ! se>
Date: 2008-01-08 8:11:52
Message-ID: 200801081015.48717.marc () klaralvdalens-datakonsult ! se
[Download RAW message or body]
On Monday 07 January 2008 19:39, Christian Weilbach wrote:
> + QByteArray httpData(
> dynamic_cast<KIO::StoredTransferJob*>(job)->data() ); +
Either you use dynamic_cast<>, and expect it to fail (then you have to check
the return type), or you don't, in which case you should use static_cast, and
probably assert() on the corresponding dynamic_cast<>, or better still, since
this is a QObject, on qobject_cast<>:
assert( qobject_cast<KIO::StoredTransferJob*>( job ) );
QByteArray httpData =
static_cast<KIO::StoredTransferJob*>( job )->data();
Thanks,
Marc
--
Marc Mutz -- marc@klaralvdalens-datakonsult.se, mutz@kde.org
Klarälvdalens Datakonsult AB, Platform-independent software solutions
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic