diff options
author | Paul Wicking <paul.wicking@qt.io> | 2024-04-11 15:03:02 +0200 |
---|---|---|
committer | Paul Wicking <paul.wicking@qt.io> | 2024-04-17 05:23:17 +0200 |
commit | 00a48038161a3f1740bceecf7cc34f3fb49ab4d9 (patch) | |
tree | 4718470d538da0820c9748edb326d23ef7d9fb61 | |
parent | 47777e70b1febcf85077050bb072b17903c37218 (diff) |
QDoc: Rename method in Atom
The method `Atom::appendString` operates on a member string list.
However, it doesn't append a string to the list; it concatenates its
argument with the first string in the list. Rename the method to
reduce ambiguity and pave the way for a method that actually appends a
string to the list of strings.
Task-number: QTBUG-122261
Change-Id: I68fa9401e2180c49121f1d2c9853ca149c98cd76
Reviewed-by: Topi Reiniƶ <topi.reinio@qt.io>
-rw-r--r-- | src/qdoc/qdoc/src/qdoc/atom.cpp | 2 | ||||
-rw-r--r-- | src/qdoc/qdoc/src/qdoc/atom.h | 2 | ||||
-rw-r--r-- | src/qdoc/qdoc/src/qdoc/docparser.cpp | 8 |
3 files changed, 6 insertions, 6 deletions
diff --git a/src/qdoc/qdoc/src/qdoc/atom.cpp b/src/qdoc/qdoc/src/qdoc/atom.cpp index 04daf640f..10f67696c 100644 --- a/src/qdoc/qdoc/src/qdoc/atom.cpp +++ b/src/qdoc/qdoc/src/qdoc/atom.cpp @@ -239,7 +239,7 @@ static const struct \also string() */ -/*! \fn void Atom::appendString(const QString &string) +/*! \fn void Atom::concatenateString(const QString &string) Appends \a string to the string parameter of this atom. diff --git a/src/qdoc/qdoc/src/qdoc/atom.h b/src/qdoc/qdoc/src/qdoc/atom.h index bcbe7b6c7..6aee9847f 100644 --- a/src/qdoc/qdoc/src/qdoc/atom.h +++ b/src/qdoc/qdoc/src/qdoc/atom.h @@ -134,7 +134,7 @@ public: virtual ~Atom() = default; void appendChar(QChar ch) { m_strs[0] += ch; } - void appendString(const QString &string) { m_strs[0] += string; } + void concatenateString(const QString &string) { m_strs[0] += string; } void chopString() { m_strs[0].chop(1); } void setString(const QString &string) { m_strs[0] = string; } Atom *next() { return m_next; } diff --git a/src/qdoc/qdoc/src/qdoc/docparser.cpp b/src/qdoc/qdoc/src/qdoc/docparser.cpp index c3f1a303f..b6304a960 100644 --- a/src/qdoc/qdoc/src/qdoc/docparser.cpp +++ b/src/qdoc/qdoc/src/qdoc/docparser.cpp @@ -1172,7 +1172,7 @@ void DocParser::parse(const QString &source, DocPrivate *docPrivate, QString suffix = Text::subText(currentLinkAtom, m_private->m_text.lastAtom()) .toString(); - currentLinkAtom->appendString(suffix); + currentLinkAtom->concatenateString(suffix); } currentLinkAtom = nullptr; } @@ -1808,7 +1808,7 @@ void DocParser::appendWord(const QString &word) if (m_private->m_text.lastAtom()->type() != Atom::String) { appendAtom(Atom(Atom::String, word)); } else - m_private->m_text.lastAtom()->appendString(word); + m_private->m_text.lastAtom()->concatenateString(word); } void DocParser::appendToCode(const QString &markedCode) @@ -1817,7 +1817,7 @@ void DocParser::appendToCode(const QString &markedCode) appendAtom(Atom(Atom::Code)); m_lastAtom = m_private->m_text.lastAtom(); } - m_lastAtom->appendString(markedCode); + m_lastAtom->concatenateString(markedCode); } void DocParser::appendToCode(const QString &markedCode, Atom::AtomType defaultType) @@ -1826,7 +1826,7 @@ void DocParser::appendToCode(const QString &markedCode, Atom::AtomType defaultTy appendAtom(Atom(defaultType, markedCode)); m_lastAtom = m_private->m_text.lastAtom(); } else { - m_lastAtom->appendString(markedCode); + m_lastAtom->concatenateString(markedCode); } } |