From 0f4b482bb395c1a7370726b649f7da33f60d09b0 Mon Sep 17 00:00:00 2001 From: Nicolas Werner Date: Wed, 29 Dec 2021 06:10:08 +0100 Subject: [PATCH] Remove a few casts --- src/timeline/DelegateChooser.cpp | 2 +- src/timeline/TimelineViewManager.cpp | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/timeline/DelegateChooser.cpp b/src/timeline/DelegateChooser.cpp index f0511f51..ad734895 100644 --- a/src/timeline/DelegateChooser.cpp +++ b/src/timeline/DelegateChooser.cpp @@ -120,7 +120,7 @@ void DelegateChooser::DelegateIncubator::statusChanged(QQmlIncubator::Status status) { if (status == QQmlIncubator::Ready) { - chooser.child_ = dynamic_cast(object()); + chooser.child_ = qobject_cast(object()); if (chooser.child_ == nullptr) { nhlog::ui()->error("Delegate has to be derived of Item!"); return; diff --git a/src/timeline/TimelineViewManager.cpp b/src/timeline/TimelineViewManager.cpp index 8e94989b..effd0136 100644 --- a/src/timeline/TimelineViewManager.cpp +++ b/src/timeline/TimelineViewManager.cpp @@ -328,15 +328,15 @@ TimelineViewManager::TimelineViewManager(CallManager *callManager, ChatPage *par view->setSource(QUrl(QStringLiteral("qrc:///qml/Root.qml"))); connect(parent, &ChatPage::themeChanged, this, &TimelineViewManager::updateColorPalette); - connect(dynamic_cast(parent), + connect(parent, &ChatPage::receivedRoomDeviceVerificationRequest, verificationManager_, &VerificationManager::receivedRoomDeviceVerificationRequest); - connect(dynamic_cast(parent), + connect(parent, &ChatPage::receivedDeviceVerificationRequest, verificationManager_, &VerificationManager::receivedDeviceVerificationRequest); - connect(dynamic_cast(parent), + connect(parent, &ChatPage::receivedDeviceVerificationStart, verificationManager_, &VerificationManager::receivedDeviceVerificationStart);