QAmqpChannelHash: Substitute static_cast for qobject_cast

This commit is contained in:
Stuart Longland 2015-05-02 21:09:09 +10:00
parent e43224877f
commit 60f680a4ef
1 changed files with 3 additions and 1 deletions

View File

@ -90,7 +90,9 @@ void QAmqpChannelHash::channelDestroyed(QObject* object)
*/
void QAmqpChannelHash::queueDeclared()
{
put(static_cast<QAmqpQueue*>(sender()));
QAmqpQueue *queue = qobject_cast<QAmqpQueue*>(sender());
if (queue)
put(queue);
}
/*!