summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2023-02-06 13:16:42 +0100
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2023-02-13 10:58:49 +0000
commit22c5bf53be8b7541d2959360e2d5dd26b8bf4fda (patch)
treec12cbb98ea59802cbedf75e750f87bfd00980ee7
parent47b2e3107e56440a9e0f57dc2f341aae38334cca (diff)
downloadqttools-22c5bf53be8b7541d2959360e2d5dd26b8bf4fda.tar.gz
qdoc: Remove duplicated helper function
It causes clashes in CMake Unity (Jumbo) builds. Task-number: QTBUG-109394 Change-Id: Ia7aa2428f93f5ff07fea7e77e93df91cd0a75f4e Reviewed-by: Amir Masoud Abdol <amir.abdol@qt.io> Reviewed-by: Luca Di Sera <luca.disera@qt.io> (cherry picked from commit 00cc7b2e4a39eea81abf46b485a98c2cfc79630c) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r--src/qdoc/qmlcodemarker.cpp8
-rw-r--r--src/qdoc/qmlcodeparser.cpp2
2 files changed, 2 insertions, 8 deletions
diff --git a/src/qdoc/qmlcodemarker.cpp b/src/qdoc/qmlcodemarker.cpp
index 3ad787c93..20b2ccffc 100644
--- a/src/qdoc/qmlcodemarker.cpp
+++ b/src/qdoc/qmlcodemarker.cpp
@@ -143,13 +143,7 @@ QString QmlCodeMarker::addMarkUp(const QString &code, const Node * /* relative *
Copied and pasted from
src/declarative/qml/qqmlscriptparser.cpp.
*/
-static void replaceWithSpace(QString &str, int idx, int n)
-{
- QChar *data = str.data() + idx;
- const QChar space(QLatin1Char(' '));
- for (int ii = 0; ii < n; ++ii)
- *data++ = space;
-}
+void replaceWithSpace(QString &str, int idx, int n); // qmlcodeparser.cpp
/*
Copied and pasted from
diff --git a/src/qdoc/qmlcodeparser.cpp b/src/qdoc/qmlcodeparser.cpp
index 22c1d1903..1e7edee59 100644
--- a/src/qdoc/qmlcodeparser.cpp
+++ b/src/qdoc/qmlcodeparser.cpp
@@ -133,7 +133,7 @@ const QSet<QString> &QmlCodeParser::topicCommands()
This function blanks out the section of the \a str beginning at \a idx
and running for \a n characters.
*/
-static void replaceWithSpace(QString &str, int idx, int n)
+void replaceWithSpace(QString &str, int idx, int n) // Also used in qmlcodemarker.cpp.
{
QChar *data = str.data() + idx;
const QChar space(QLatin1Char(' '));