diff options
author | Roberto Raggi <roberto.raggi@nokia.com> | 2009-06-15 15:38:20 +0200 |
---|---|---|
committer | Roberto Raggi <roberto.raggi@nokia.com> | 2009-06-15 15:39:20 +0200 |
commit | e2a0a4d7c572f0d2771731d48ea33b9925c58f1e (patch) | |
tree | 92d7f52d4a50dc5286ecc3cea69b00100bc548b7 /src/plugins/cpptools/cpptoolseditorsupport.cpp | |
parent | dbba0ff8d7456de3d8e7cc2796c48fcbc700acf1 (diff) | |
download | qt-creator-e2a0a4d7c572f0d2771731d48ea33b9925c58f1e.tar.gz |
Keep the original encoded text around while preprocessing.
Diffstat (limited to 'src/plugins/cpptools/cpptoolseditorsupport.cpp')
-rw-r--r-- | src/plugins/cpptools/cpptoolseditorsupport.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/plugins/cpptools/cpptoolseditorsupport.cpp b/src/plugins/cpptools/cpptoolseditorsupport.cpp index 8352b40806..17dbde9521 100644 --- a/src/plugins/cpptools/cpptoolseditorsupport.cpp +++ b/src/plugins/cpptools/cpptoolseditorsupport.cpp @@ -348,12 +348,12 @@ void CppEditorSupport::setTextEditor(TextEditor::ITextEditor *textEditor) updateDocument(); } -QByteArray CppEditorSupport::contents() +QString CppEditorSupport::contents() { if (! _textEditor) - return QByteArray(); + return QString(); else if (! _cachedContents.isEmpty()) - _cachedContents = _textEditor->contents().toUtf8(); + _cachedContents = _textEditor->contents(); return _cachedContents; } @@ -403,7 +403,7 @@ void CppEditorSupport::checkDocumentNow() qobject_cast<TextEditor::BaseTextEditor *>(_textEditor->widget()); Snapshot snapshot = _modelManager->snapshot(); - const QByteArray plainText = contents(); + const QString plainText = contents(); const QString fileName = _textEditor->file()->fileName(); const QByteArray preprocessedCode = snapshot.preprocessedCode(plainText, fileName); |