Remove a few casts

This commit is contained in:
Nicolas Werner 2021-12-29 06:10:08 +01:00
parent 19dc6cadea
commit 0f4b482bb3
No known key found for this signature in database
GPG key ID: C8D75E610773F2D9
2 changed files with 4 additions and 4 deletions

View file

@ -120,7 +120,7 @@ void
DelegateChooser::DelegateIncubator::statusChanged(QQmlIncubator::Status status) DelegateChooser::DelegateIncubator::statusChanged(QQmlIncubator::Status status)
{ {
if (status == QQmlIncubator::Ready) { if (status == QQmlIncubator::Ready) {
chooser.child_ = dynamic_cast<QQuickItem *>(object()); chooser.child_ = qobject_cast<QQuickItem *>(object());
if (chooser.child_ == nullptr) { if (chooser.child_ == nullptr) {
nhlog::ui()->error("Delegate has to be derived of Item!"); nhlog::ui()->error("Delegate has to be derived of Item!");
return; return;

View file

@ -328,15 +328,15 @@ TimelineViewManager::TimelineViewManager(CallManager *callManager, ChatPage *par
view->setSource(QUrl(QStringLiteral("qrc:///qml/Root.qml"))); view->setSource(QUrl(QStringLiteral("qrc:///qml/Root.qml")));
connect(parent, &ChatPage::themeChanged, this, &TimelineViewManager::updateColorPalette); connect(parent, &ChatPage::themeChanged, this, &TimelineViewManager::updateColorPalette);
connect(dynamic_cast<ChatPage *>(parent), connect(parent,
&ChatPage::receivedRoomDeviceVerificationRequest, &ChatPage::receivedRoomDeviceVerificationRequest,
verificationManager_, verificationManager_,
&VerificationManager::receivedRoomDeviceVerificationRequest); &VerificationManager::receivedRoomDeviceVerificationRequest);
connect(dynamic_cast<ChatPage *>(parent), connect(parent,
&ChatPage::receivedDeviceVerificationRequest, &ChatPage::receivedDeviceVerificationRequest,
verificationManager_, verificationManager_,
&VerificationManager::receivedDeviceVerificationRequest); &VerificationManager::receivedDeviceVerificationRequest);
connect(dynamic_cast<ChatPage *>(parent), connect(parent,
&ChatPage::receivedDeviceVerificationStart, &ChatPage::receivedDeviceVerificationStart,
verificationManager_, verificationManager_,
&VerificationManager::receivedDeviceVerificationStart); &VerificationManager::receivedDeviceVerificationStart);