summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2023-05-03 12:04:01 +0200
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2023-05-03 12:28:29 +0200
commit84121904e0fa8801b5cc95981d5500ba9bc312d8 (patch)
tree71bc748477dd404c75dde301ef6615aef2eb4046
parente812ec499fb94f2e392e20c101f08b8332ddaa0c (diff)
downloadqttools-84121904e0fa8801b5cc95981d5500ba9bc312d8.tar.gz
QHelpCollectionHandler: Fix static analysis warning about const-signals
Pick-to: 6.5 Change-Id: I422dc9df9dfcbafbdde99708692e4b59d112e99e Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
-rw-r--r--src/assistant/help/qhelpcollectionhandler.cpp5
-rw-r--r--src/assistant/help/qhelpcollectionhandler_p.h2
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<QHelpCollectionHandler *>(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