diff options
author | Michael Weghorn <m.weghorn@posteo.de> | 2024-09-19 11:13:24 +0200 |
---|---|---|
committer | Michael Weghorn <m.weghorn@posteo.de> | 2024-09-19 15:36:49 +0200 |
commit | 4722174f2132b1f0d29ab491d687fee6274d216f (patch) | |
tree | 067a5a2f9178bf217de88e1b63ad23b55cf13279 /vcl | |
parent | be113bcfef5a411af43bcbcc7e51fc959eb4bcae (diff) |
qt: Use more qobject_cast instead of dynamic_cast
Change-Id: I236d016dd51f219b63a7d7fb6b0cb83a06b960c6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173661
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/qt5/QtFrame.cxx | 2 | ||||
-rw-r--r-- | vcl/qt5/QtInstanceMessageDialog.cxx | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/vcl/qt5/QtFrame.cxx b/vcl/qt5/QtFrame.cxx index 4b2ffe26e506..52fe03543c9a 100644 --- a/vcl/qt5/QtFrame.cxx +++ b/vcl/qt5/QtFrame.cxx @@ -1551,7 +1551,7 @@ void QtFrame::handleDrop(QDropEvent* pEvent) // inform the drag source of the drag-origin frame of the drop result if (pEvent->source()) { - QtWidget* pWidget = dynamic_cast<QtWidget*>(pEvent->source()); + QtWidget* pWidget = qobject_cast<QtWidget*>(pEvent->source()); assert(pWidget); // AFAIK there shouldn't be any non-Qt5Widget as source in LO itself if (pWidget) pWidget->frame().m_pDragSource->fire_dragEnd(nDropAction, bDropSuccessful); diff --git a/vcl/qt5/QtInstanceMessageDialog.cxx b/vcl/qt5/QtInstanceMessageDialog.cxx index 76903fc5c63c..7b17c106fa65 100644 --- a/vcl/qt5/QtInstanceMessageDialog.cxx +++ b/vcl/qt5/QtInstanceMessageDialog.cxx @@ -263,7 +263,7 @@ QPushButton* QtInstanceMessageDialog::buttonForResponseCode(int nResponse) { if (pAbstractButton->property(PROPERTY_VCL_RESPONSE_CODE).toInt() == nResponse) { - QPushButton* pButton = dynamic_cast<QPushButton*>(pAbstractButton); + QPushButton* pButton = qobject_cast<QPushButton*>(pAbstractButton); assert(pButton); return pButton; } |