From 22c5bf53be8b7541d2959360e2d5dd26b8bf4fda Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Mon, 6 Feb 2023 13:16:42 +0100 Subject: 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 Reviewed-by: Luca Di Sera (cherry picked from commit 00cc7b2e4a39eea81abf46b485a98c2cfc79630c) Reviewed-by: Qt Cherry-pick Bot --- src/qdoc/qmlcodemarker.cpp | 8 +------- src/qdoc/qmlcodeparser.cpp | 2 +- 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 &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(' ')); -- cgit v1.2.1