Micro-optimize qdoc codeparser.
There is no need to allocate new string while a simple reference is enough. Change-Id: I137b58fc180fe9a7bff9d0f9e546ca04aa9f4696 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>bb10
parent
8b7a2d582c
commit
2f1ab7156a
|
|
@ -340,8 +340,8 @@ void CodeParser::extractPageLinkAndDesc(const QString& arg,
|
|||
else {
|
||||
int spaceAt = arg.indexOf(QLatin1Char(' '));
|
||||
if (arg.contains(QLatin1String(".html")) && spaceAt != -1) {
|
||||
*link = arg.left(spaceAt).trimmed();
|
||||
*desc = arg.mid(spaceAt).trimmed();
|
||||
*link = arg.leftRef(spaceAt).trimmed().toString();
|
||||
*desc = arg.midRef(spaceAt).trimmed().toString();
|
||||
}
|
||||
else {
|
||||
*link = arg;
|
||||
|
|
|
|||
Loading…
Reference in New Issue