Replace some uses of static_cast with qobject_cast

This commit is contained in:
Jonas Kvinge
2020-07-17 01:32:07 +02:00
parent 9e32f0d778
commit 71a1ea481b
12 changed files with 21 additions and 21 deletions

View File

@@ -102,10 +102,10 @@ void _MessageHandlerBase::WriteMessage(const QByteArray &data) {
// Sorry.
if (flush_abstract_socket_) {
((static_cast<QAbstractSocket*>(device_))->*(flush_abstract_socket_))();
((qobject_cast<QAbstractSocket*>(device_))->*(flush_abstract_socket_))();
}
else if (flush_local_socket_) {
((static_cast<QLocalSocket*>(device_))->*(flush_local_socket_))();
((qobject_cast<QLocalSocket*>(device_))->*(flush_local_socket_))();
}
}