diff --git a/src/library/sidebarmodel.cpp b/src/library/sidebarmodel.cpp index 87155c09f9f9..8658e27e6fa5 100644 --- a/src/library/sidebarmodel.cpp +++ b/src/library/sidebarmodel.cpp @@ -385,7 +385,7 @@ QModelIndex SidebarModel::translateSourceIndex(const QModelIndex& index) { * For child models, this always the child models itself */ - const QAbstractItemModel* model = dynamic_cast(sender()); + const QAbstractItemModel* model = qobject_cast(sender()); VERIFY_OR_DEBUG_ASSERT(model != NULL) { return QModelIndex(); } diff --git a/src/musicbrainz/network.cpp b/src/musicbrainz/network.cpp index ff198b94a825..6b406f2645a5 100644 --- a/src/musicbrainz/network.cpp +++ b/src/musicbrainz/network.cpp @@ -59,7 +59,7 @@ void NetworkTimeouts::addReply(QNetworkReply* reply) { } void NetworkTimeouts::replyFinished() { - QNetworkReply* reply = reinterpret_cast(sender()); + QNetworkReply* reply = qobject_cast(sender()); if (m_timers.contains(reply)) { killTimer(m_timers.take(reply)); } diff --git a/src/musicbrainz/tagfetcher.cpp b/src/musicbrainz/tagfetcher.cpp index 7039bb15ec9d..81b66103611b 100644 --- a/src/musicbrainz/tagfetcher.cpp +++ b/src/musicbrainz/tagfetcher.cpp @@ -66,7 +66,7 @@ void TagFetcher::cancel() { } void TagFetcher::fingerprintFound(int index) { - QFutureWatcher* watcher = reinterpret_cast*>(sender()); + QFutureWatcher* watcher = static_cast*>(sender()); if (!watcher || index >= m_tracks.count()) { return; }