diff options
author | Nicolas Werner <nicolas.werner@hotmail.de> | 2021-12-29 06:10:08 +0100 |
---|---|---|
committer | Nicolas Werner <nicolas.werner@hotmail.de> | 2021-12-29 06:10:08 +0100 |
commit | 0f4b482bb395c1a7370726b649f7da33f60d09b0 (patch) | |
tree | 190c772c2ee75330382742bb269ee9125a6bdb06 /src | |
parent | Reserve size of some containers we are filling (diff) | |
download | nheko-0f4b482bb395c1a7370726b649f7da33f60d09b0.tar.xz |
Remove a few casts
Diffstat (limited to 'src')
-rw-r--r-- | src/timeline/DelegateChooser.cpp | 2 | ||||
-rw-r--r-- | 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<QQuickItem *>(object()); + chooser.child_ = qobject_cast<QQuickItem *>(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<ChatPage *>(parent), + connect(parent, &ChatPage::receivedRoomDeviceVerificationRequest, verificationManager_, &VerificationManager::receivedRoomDeviceVerificationRequest); - connect(dynamic_cast<ChatPage *>(parent), + connect(parent, &ChatPage::receivedDeviceVerificationRequest, verificationManager_, &VerificationManager::receivedDeviceVerificationRequest); - connect(dynamic_cast<ChatPage *>(parent), + connect(parent, &ChatPage::receivedDeviceVerificationStart, verificationManager_, &VerificationManager::receivedDeviceVerificationStart); |