summaryrefslogtreecommitdiff
path: root/vcl/qt5
diff options
context:
space:
mode:
authorMichael Weghorn <m.weghorn@posteo.de>2022-08-16 09:39:01 +0200
committerMichael Weghorn <m.weghorn@posteo.de>2022-08-16 11:43:44 +0200
commitf29e3dbe015571d49d4262f4623a165a0cbc94a3 (patch)
treef3ba535dc0695f6ba35fc74c803cd576294dd49b /vcl/qt5
parentda46f3db22814c03fbc303275342f7182ea288b4 (diff)
qt a11y: Replace dynamic_cast with static_cast
The Qt doc on implementing accessible plugins [1] says: > Note that `object` will always be an instance of `classname`. Therefore, `static_cast` can be used here to avoid the cost of `dynamic_cast`. [1] https://doc.qt.io/qt-6/accessible-qwidget.html#implementing-accessible-plugins Change-Id: I57721c927808fa710b7d790c54d01bd899146a60 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138341 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Diffstat (limited to 'vcl/qt5')
-rw-r--r--vcl/qt5/QtAccessibleWidget.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/vcl/qt5/QtAccessibleWidget.cxx b/vcl/qt5/QtAccessibleWidget.cxx
index c0ed4a2096f7..9d2b17f86de7 100644
--- a/vcl/qt5/QtAccessibleWidget.cxx
+++ b/vcl/qt5/QtAccessibleWidget.cxx
@@ -730,7 +730,7 @@ QAccessibleInterface* QtAccessibleWidget::customFactory(const QString& classname
}
if (classname == QLatin1String("QtXAccessible") && object)
{
- QtXAccessible* pXAccessible = dynamic_cast<QtXAccessible*>(object);
+ QtXAccessible* pXAccessible = static_cast<QtXAccessible*>(object);
if (pXAccessible && pXAccessible->m_xAccessible.is())
return new QtAccessibleWidget(pXAccessible->m_xAccessible, object);
}