vcl/qt5/QtAccessibleWidget.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
New commits: commit 04af1b4e1ce5e3e74bad517a238957bf9aaccdcd Author: Michael Weghorn <m.wegh...@posteo.de> AuthorDate: Tue Aug 16 14:25:18 2022 +0200 Commit: Michael Weghorn <m.wegh...@posteo.de> CommitDate: Tue Aug 16 22:29:57 2022 +0200 qt a11y: Drop duplicate nullptr check There is already a check whether `object` is a nullptr just a few lines above, so this check is superfluous since commit f29e3dbe015571d49d4262f4623a165a0cbc94a3 Author: Michael Weghorn <m.wegh...@posteo.de> Date: Tue Aug 16 09:39:01 2022 +0200 qt a11y: Replace dynamic_cast with static_cast Reported by cppcheck: > .../vcl/qt5/QtAccessibleWidget.cxx:751: Condition 'pXAccessible' is always true Change-Id: Iab69c967d97fc01dad617a25503cc5b5e50a3b4f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138366 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.wegh...@posteo.de> diff --git a/vcl/qt5/QtAccessibleWidget.cxx b/vcl/qt5/QtAccessibleWidget.cxx index 09d01c6e496f..876b735b0e48 100644 --- a/vcl/qt5/QtAccessibleWidget.cxx +++ b/vcl/qt5/QtAccessibleWidget.cxx @@ -748,7 +748,7 @@ QAccessibleInterface* QtAccessibleWidget::customFactory(const QString& classname if (classname == QLatin1String("QtXAccessible") && object) { QtXAccessible* pXAccessible = static_cast<QtXAccessible*>(object); - if (pXAccessible && pXAccessible->m_xAccessible.is()) + if (pXAccessible->m_xAccessible.is()) { QtAccessibleWidget* pRet = new QtAccessibleWidget(pXAccessible->m_xAccessible, object); // clear the reference in the QtXAccessible, no longer needed now that the QtAccessibleWidget holds one