From 84121904e0fa8801b5cc95981d5500ba9bc312d8 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Wed, 3 May 2023 12:04:01 +0200 Subject: QHelpCollectionHandler: Fix static analysis warning about const-signals Pick-to: 6.5 Change-Id: I422dc9df9dfcbafbdde99708692e4b59d112e99e Reviewed-by: Jarek Kobus --- src/assistant/help/qhelpcollectionhandler.cpp | 5 +++-- src/assistant/help/qhelpcollectionhandler_p.h | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/assistant/help/qhelpcollectionhandler.cpp b/src/assistant/help/qhelpcollectionhandler.cpp index b8a61eae5..7d1733f10 100644 --- a/src/assistant/help/qhelpcollectionhandler.cpp +++ b/src/assistant/help/qhelpcollectionhandler.cpp @@ -72,8 +72,9 @@ bool QHelpCollectionHandler::isDBOpened() const { if (m_query) return true; - emit error(tr("The collection file \"%1\" is not set up yet."). - arg(m_collectionFile)); + auto *that = const_cast(this); + emit that->error(tr("The collection file \"%1\" is not set up yet."). + arg(m_collectionFile)); return false; } diff --git a/src/assistant/help/qhelpcollectionhandler_p.h b/src/assistant/help/qhelpcollectionhandler_p.h index c656b710e..c2e89b60f 100644 --- a/src/assistant/help/qhelpcollectionhandler_p.h +++ b/src/assistant/help/qhelpcollectionhandler_p.h @@ -184,7 +184,7 @@ public: const QString &relFileName, const QString &anchor); signals: - void error(const QString &msg) const; + void error(const QString &msg); private: // legacy stuff -- cgit v1.2.1