summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorhjk <hjk121@nokiamail.com>2013-10-06 03:18:07 +0200
committerhjk <hjk121@nokiamail.com>2013-10-07 21:05:54 +0200
commit2187195995b9e0192f79b6f3705704d70b430645 (patch)
tree0e7f79e31c1a551675ccaf09009f625fcb893b50 /src
parent4258715731758694100c08720e6358c96a104d85 (diff)
downloadqt-creator-2187195995b9e0192f79b6f3705704d70b430645.tar.gz
CPlusPlus: Remove unneeded utf-8 roundtrip.
Change-Id: Iae3dcba305bac8a632c1ae94586fd687509ed92d Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
Diffstat (limited to 'src')
-rw-r--r--src/libs/cplusplus/TypeOfExpression.h1
-rw-r--r--src/plugins/cppeditor/cppfunctiondecldeflink.cpp5
2 files changed, 3 insertions, 3 deletions
diff --git a/src/libs/cplusplus/TypeOfExpression.h b/src/libs/cplusplus/TypeOfExpression.h
index b9674fa205..3df6814e12 100644
--- a/src/libs/cplusplus/TypeOfExpression.h
+++ b/src/libs/cplusplus/TypeOfExpression.h
@@ -111,6 +111,7 @@ public:
Document::Ptr document,
Scope *scope);
+ // Returns UTF-8.
QByteArray preprocess(const QByteArray &utf8code) const;
/**
diff --git a/src/plugins/cppeditor/cppfunctiondecldeflink.cpp b/src/plugins/cppeditor/cppfunctiondecldeflink.cpp
index 4539875297..916dd4b6cb 100644
--- a/src/plugins/cppeditor/cppfunctiondecldeflink.cpp
+++ b/src/plugins/cppeditor/cppfunctiondecldeflink.cpp
@@ -566,11 +566,10 @@ Utils::ChangeSet FunctionDeclDefLink::changes(const Snapshot &snapshot, int targ
newDeclText[i] = QLatin1Char('\n');
}
newDeclText.append(QLatin1String("{}"));
- const QString newDeclTextPreprocessed =
- QString::fromUtf8(typeOfExpression.preprocess(newDeclText.toUtf8()));
+ const QByteArray newDeclTextPreprocessed = typeOfExpression.preprocess(newDeclText.toUtf8());
Document::Ptr newDeclDoc = Document::create(QLatin1String("<decl>"));
- newDeclDoc->setUtf8Source(newDeclTextPreprocessed.toUtf8());
+ newDeclDoc->setUtf8Source(newDeclTextPreprocessed);
newDeclDoc->parse(Document::ParseDeclaration);
newDeclDoc->check();