From 5fff1e414a060c0619a97ad8d3f5665e3f5a4878 Mon Sep 17 00:00:00 2001 From: "Friedrich W. H. Kossebau" Date: Fri, 9 Jan 2026 16:16:48 +0100 Subject: Use Q_ASSERT instead of Q_CHECK_PTR for plain checks of pointer value Q_CHECK_PTR (other than the name suggests) is intended only to check the success of memory allocations. Using it for any pointers instead can be misleading due to the "Out of memory" log printed in case of hits. --- src/tests/dolphinmainwindowtest.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/tests/dolphinmainwindowtest.cpp') diff --git a/src/tests/dolphinmainwindowtest.cpp b/src/tests/dolphinmainwindowtest.cpp index fb3c95383..f68f07cbc 100644 --- a/src/tests/dolphinmainwindowtest.cpp +++ b/src/tests/dolphinmainwindowtest.cpp @@ -863,7 +863,7 @@ void DolphinMainWindowTest::testAccessibilityTree() QTRY_VERIFY_WITH_TIMEOUT(QApplication::activeWindow() != nullptr, 100); QAccessibleInterface *accessibleInterfaceOfMainWindow = QAccessible::queryAccessibleInterface(m_mainWindow.get()); - Q_CHECK_PTR(accessibleInterfaceOfMainWindow); + Q_ASSERT(accessibleInterfaceOfMainWindow); /// Test the accessibility of objects while traversing forwards (Tab key) and backwards (Shift+Tab). int testedObjectsSizeAfterTraversingForwards = 0; -- cgit v1.3