summaryrefslogtreecommitdiffstats
path: root/src/tools/qdoc/generator.cpp
diff options
context:
space:
mode:
authorTopi Reinio <topi.reinio@digia.com>2015-08-28 15:01:17 +0200
committerTopi Reiniƶ <topi.reinio@digia.com>2015-09-07 11:11:43 +0000
commit9c6a49078ae0da65f605384ba16e2a46e19ff5a1 (patch)
tree58bc58114c2085846a95efb214c6e95eeb22f408 /src/tools/qdoc/generator.cpp
parent72e5fda3bd1b50ee3e0da0b5ef6505e632f7f5bc (diff)
qdoc: Introduce codeprefix & codesuffix, re-introduce codeindent
In order to provide acceptable results for styling the documentation for rendering using QTextBrowser (instead of a full browser engine), QDoc needs flexibility in adjusting the generated HTML. This commit introduces and documents codeprefix and codesuffix variables for qdocconf, and re-introduces the once-removed support for codeindent. The default codeindent value is reset to 0. These changes have no effect to the generated output unless the above variables are defined. Change-Id: I6eb40dc0700725622e5a525ef19b5626b3b2b6a5 Reviewed-by: Martin Smith <martin.smith@digia.com>
Diffstat (limited to 'src/tools/qdoc/generator.cpp')
-rw-r--r--src/tools/qdoc/generator.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/tools/qdoc/generator.cpp b/src/tools/qdoc/generator.cpp
index dc731f0121..5037d95640 100644
--- a/src/tools/qdoc/generator.cpp
+++ b/src/tools/qdoc/generator.cpp
@@ -2115,11 +2115,14 @@ void Generator::terminateGenerator()
Trims trailing whitespace off the \a string and returns
the trimmed string.
*/
-QString Generator::trimmedTrailing(const QString& string)
+QString Generator::trimmedTrailing(const QString& string, const QString &prefix, const QString &suffix)
{
QString trimmed = string;
while (trimmed.length() > 0 && trimmed[trimmed.length() - 1].isSpace())
trimmed.truncate(trimmed.length() - 1);
+
+ trimmed.append(suffix);
+ trimmed.prepend(prefix);
return trimmed;
}