summaryrefslogtreecommitdiffstats
path: root/src/tools/qdoc/doc.cpp
diff options
context:
space:
mode:
authorMartin Smith <martin.smith@digia.com>2014-11-06 15:24:44 +0100
committerMartin Smith <martin.smith@digia.com>2014-11-12 10:53:30 +0100
commitad2cdb2c9474b7ac37eeae0bf932d01bcfc51c2d (patch)
tree42b2ab8b03561cfd639ac95f3910ed7b756b4a69 /src/tools/qdoc/doc.cpp
parent98e77dab75e1463e51c2fc3893d2d44e146e9a8b (diff)
qdoc: Remove CR from command parameters
Although it is not recommended, it is allowed to have a carriage return in a qdoc command parameter that is enclosed in curly braces. qdoc is supposed to use QString::simplified() to sanitize the string so that all whitespace is replaced by a single ' '. But in at least one case, this didn't work, and the carriage return was left in the string, which caused qdoc to report that it couldn't find links that have the carriage return in them. The problem has been fixed by replacing the carriage return with a ' ' right when and where it is detected. Change-Id: I31c31f19a1e4150b2e27613ecbac260c46a7109b Task-number: QTBUG-42449 Reviewed-by: Topi Reiniƶ <topi.reinio@digia.com>
Diffstat (limited to 'src/tools/qdoc/doc.cpp')
-rw-r--r--src/tools/qdoc/doc.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/tools/qdoc/doc.cpp b/src/tools/qdoc/doc.cpp
index c4a2c8029b..c10e3b4669 100644
--- a/src/tools/qdoc/doc.cpp
+++ b/src/tools/qdoc/doc.cpp
@@ -2324,7 +2324,10 @@ QString DocParser::getBracedArgument(bool verbatim)
}
break;
default:
- arg += in[pos];
+ if (in[pos].isSpace() && !verbatim)
+ arg += QChar(' ');
+ else
+ arg += in[pos];
pos++;
}
}