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/dolphintabpage.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/dolphintabpage.cpp') diff --git a/src/dolphintabpage.cpp b/src/dolphintabpage.cpp index ce091cfc1..ca47130c0 100644 --- a/src/dolphintabpage.cpp +++ b/src/dolphintabpage.cpp @@ -425,7 +425,7 @@ void DolphinTabPage::slotAnimationFinished() void DolphinTabPage::slotAnimationValueChanged(const QVariant &value) { - Q_CHECK_PTR(m_expandingContainer); + Q_ASSERT(m_expandingContainer); const int indexOfExpandingContainer = m_splitter->indexOf(m_expandingContainer); int indexOfNonExpandingContainer = -1; if (m_expandingContainer == m_primaryViewContainer) { @@ -533,7 +533,7 @@ DolphinViewContainer *DolphinTabPage::createViewContainer(const QUrl &url) const void DolphinTabPage::startExpandViewAnimation(DolphinViewContainer *expandingContainer) { - Q_CHECK_PTR(expandingContainer); + Q_ASSERT(expandingContainer); Q_ASSERT(expandingContainer == m_primaryViewContainer || expandingContainer == m_secondaryViewContainer); m_expandingContainer = expandingContainer; -- cgit v1.3