Commit 96278750 authored by Nikolai Kosjar's avatar Nikolai Kosjar
Browse files

CppEditor: Concatenate strings with + instead of %



operator+ is the official way for concatenating strings whereas operator%
is an optimization that needs certain defines.

The code which was using operator % is not performance critical.

Change-Id: I4c7f4310cc5708aa5f9009672d932f913a2eb59f
Reviewed-by: default avatarErik Verbruggen <erik.verbruggen@digia.com>
Reviewed-by: default avatarChristian Kandeler <christian.kandeler@digia.com>
parent e4714f80
......@@ -57,7 +57,6 @@
#include <QInputDialog>
#include <QMessageBox>
#include <QSharedPointer>
#include <QStringBuilder>
#include <QTextBlock>
#include <QTextCursor>
......@@ -2904,9 +2903,9 @@ public:
funcDecl.append(QLatin1String(";\n"));
if (m_funcReturn) {
funcDef.append(QLatin1String("\nreturn ")
% m_relevantDecls.at(0).first
% QLatin1String(";"));
funcCall.prepend(m_relevantDecls.at(0).second % QLatin1String(" = "));
+ m_relevantDecls.at(0).first
+ QLatin1String(";"));
funcCall.prepend(m_relevantDecls.at(0).second + QLatin1String(" = "));
}
funcDef.append(QLatin1String("\n}\n\n"));
funcDef.replace(QChar::ParagraphSeparator, QLatin1String("\n"));
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment