summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTopi Reinio <topi.reinio@theqtcompany.com>2016-04-05 12:24:30 +0200
committerTopi Reiniƶ <topi.reinio@theqtcompany.com>2016-04-05 11:57:36 +0000
commit62c59455b28ce685285a78da1f79ee7e0db9b88f (patch)
tree155a17b303ed2167e3e61d0f81ffb8a7c9be84c4
parentc2fdb56f732a32af174f6b11f5d1aefd11f038ed (diff)
downloadqttools-62c59455b28ce685285a78da1f79ee7e0db9b88f.tar.gz
qdoc: Avoid trailing spaces in HTML <title>
Check whether the last string element (version info) in the title is empty before inserting a space. Change-Id: I5ade714f91b68d372e5b058701cf52ba4a515123 Reviewed-by: Martin Smith <martin.smith@theqtcompany.com>
-rw-r--r--src/qdoc/htmlgenerator.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/qdoc/htmlgenerator.cpp b/src/qdoc/htmlgenerator.cpp
index 86b3b165a..02384c962 100644
--- a/src/qdoc/htmlgenerator.cpp
+++ b/src/qdoc/htmlgenerator.cpp
@@ -2016,10 +2016,12 @@ void HtmlGenerator::generateHeader(const QString& title,
out() << " <title>"
<< protectEnc(title)
<< divider
- << titleSuffix
- << QLatin1Char(' ')
- << shortVersion
- << "</title>\n";
+ << titleSuffix;
+
+ if (!shortVersion.isEmpty())
+ out() << QLatin1Char(' ') << shortVersion;
+
+ out() << "</title>\n";
// Include style sheet and script links.
out() << headerStyles;