summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/libs/cplusplus/CppDocument.cpp6
-rw-r--r--src/libs/cplusplus/CppDocument.h4
-rw-r--r--src/libs/cplusplus/FindUsages.cpp6
-rw-r--r--src/libs/cplusplus/TypeOfExpression.cpp2
-rw-r--r--src/plugins/cppeditor/cppchecksymbols.cpp4
-rw-r--r--src/plugins/cppeditor/cppfunctiondecldeflink.cpp4
-rw-r--r--src/plugins/cpptools/cppcodegen_test.cpp30
-rw-r--r--src/plugins/cpptools/cppcompletionassist.cpp2
-rw-r--r--src/plugins/cpptools/cppmodelmanager.cpp2
-rw-r--r--src/plugins/cpptools/doxygengenerator.cpp2
-rw-r--r--src/plugins/qmljstools/qmljsfindexportedcpptypes.cpp10
-rw-r--r--src/plugins/qmljstools/qmljsmodelmanager.cpp2
-rw-r--r--src/tools/gen-cpp-ast/generate-ast.cpp6
-rw-r--r--tests/auto/cplusplus/findusages/tst_findusages.cpp6
-rw-r--r--tests/auto/cplusplus/lookup/tst_lookup.cpp20
-rw-r--r--tests/auto/cplusplus/misc/tst_misc.cpp8
16 files changed, 57 insertions, 57 deletions
diff --git a/src/libs/cplusplus/CppDocument.cpp b/src/libs/cplusplus/CppDocument.cpp
index d839a4ca23..0886416e48 100644
--- a/src/libs/cplusplus/CppDocument.cpp
+++ b/src/libs/cplusplus/CppDocument.cpp
@@ -494,10 +494,10 @@ Document::Ptr Document::create(const QString &fileName)
return doc;
}
-QByteArray Document::source() const
+QByteArray Document::utf8Source() const
{ return _source; }
-void Document::setSource(const QByteArray &source)
+void Document::setUtf8Source(const QByteArray &source)
{
_source = source;
_translationUnit->setSource(_source.constBegin(), _source.size());
@@ -686,7 +686,7 @@ Document::Ptr Snapshot::documentFromSource(const QByteArray &preprocessedCode,
newDoc->_macroUses = thisDocument->_macroUses;
}
- newDoc->setSource(preprocessedCode);
+ newDoc->setUtf8Source(preprocessedCode);
return newDoc;
}
diff --git a/src/libs/cplusplus/CppDocument.h b/src/libs/cplusplus/CppDocument.h
index bf04efca07..fdd7544777 100644
--- a/src/libs/cplusplus/CppDocument.h
+++ b/src/libs/cplusplus/CppDocument.h
@@ -99,8 +99,8 @@ public:
Symbol *lastVisibleSymbolAt(unsigned line, unsigned column = 0) const;
Scope *scopeAt(unsigned line, unsigned column = 0);
- QByteArray source() const;
- void setSource(const QByteArray &source);
+ QByteArray utf8Source() const;
+ void setUtf8Source(const QByteArray &utf8Source);
void startSkippingBlocks(unsigned offset);
void stopSkippingBlocks(unsigned offset);
diff --git a/src/libs/cplusplus/FindUsages.cpp b/src/libs/cplusplus/FindUsages.cpp
index 88285e2d86..3cde17fa5c 100644
--- a/src/libs/cplusplus/FindUsages.cpp
+++ b/src/libs/cplusplus/FindUsages.cpp
@@ -79,7 +79,7 @@ FindUsages::FindUsages(const QByteArray &originalSource, Document::Ptr doc, cons
_snapshot(snapshot),
_context(doc, snapshot),
_originalSource(originalSource),
- _source(_doc->source()),
+ _source(_doc->utf8Source()),
_currentScope(0)
{
_snapshot.insert(_doc);
@@ -93,8 +93,8 @@ FindUsages::FindUsages(const LookupContext &context)
_doc(context.thisDocument()),
_snapshot(context.snapshot()),
_context(context),
- _originalSource(_doc->source()),
- _source(_doc->source()),
+ _originalSource(_doc->utf8Source()),
+ _source(_doc->utf8Source()),
_currentScope(0)
{
typeofExpression.init(_doc, _snapshot, _context.bindings());
diff --git a/src/libs/cplusplus/TypeOfExpression.cpp b/src/libs/cplusplus/TypeOfExpression.cpp
index f6f6159b78..c6ab177de6 100644
--- a/src/libs/cplusplus/TypeOfExpression.cpp
+++ b/src/libs/cplusplus/TypeOfExpression.cpp
@@ -177,7 +177,7 @@ Document::Ptr TypeOfExpression::documentForExpression(const QByteArray &utf8code
{
// create the expression's AST.
Document::Ptr doc = Document::create(QLatin1String("<completion>"));
- doc->setSource(utf8code);
+ doc->setUtf8Source(utf8code);
doc->parse(Document::ParseExpression);
return doc;
}
diff --git a/src/plugins/cppeditor/cppchecksymbols.cpp b/src/plugins/cppeditor/cppchecksymbols.cpp
index e95adfb167..8b1deeac60 100644
--- a/src/plugins/cppeditor/cppchecksymbols.cpp
+++ b/src/plugins/cppeditor/cppchecksymbols.cpp
@@ -505,7 +505,7 @@ bool CheckSymbols::visit(MemberAccessAST *ast)
if (_potentialMembers.contains(id)) {
const Token start = tokenAt(ast->firstToken());
const Token end = tokenAt(ast->lastToken() - 1);
- const QByteArray expression = _doc->source().mid(start.begin(), end.end() - start.begin());
+ const QByteArray expression = _doc->utf8Source().mid(start.begin(), end.end() - start.begin());
const QList<LookupItem> candidates =
typeOfExpression(expression, enclosingScope(), TypeOfExpression::Preprocess);
@@ -568,7 +568,7 @@ QByteArray CheckSymbols::textOf(AST *ast) const
{
const Token start = tokenAt(ast->firstToken());
const Token end = tokenAt(ast->lastToken() - 1);
- const QByteArray text = _doc->source().mid(start.begin(), end.end() - start.begin());
+ const QByteArray text = _doc->utf8Source().mid(start.begin(), end.end() - start.begin());
return text;
}
diff --git a/src/plugins/cppeditor/cppfunctiondecldeflink.cpp b/src/plugins/cppeditor/cppfunctiondecldeflink.cpp
index d6fb74bf5f..e1dae57f51 100644
--- a/src/plugins/cppeditor/cppfunctiondecldeflink.cpp
+++ b/src/plugins/cppeditor/cppfunctiondecldeflink.cpp
@@ -579,7 +579,7 @@ Utils::ChangeSet FunctionDeclDefLink::changes(const Snapshot &snapshot, int targ
QString::fromUtf8(typeOfExpression.preprocess(newDeclText.toUtf8()));
Document::Ptr newDeclDoc = Document::create(QLatin1String("<decl>"));
- newDeclDoc->setSource(newDeclTextPreprocessed.toUtf8());
+ newDeclDoc->setUtf8Source(newDeclTextPreprocessed.toUtf8());
newDeclDoc->parse(Document::ParseDeclaration);
newDeclDoc->check();
@@ -810,7 +810,7 @@ Utils::ChangeSet FunctionDeclDefLink::changes(const Snapshot &snapshot, int targ
// don't change the name if it's in a comment
if (hasCommentedName(targetFile->cppDocument()->translationUnit(),
- QLatin1String(targetFile->cppDocument()->source()),
+ QLatin1String(targetFile->cppDocument()->utf8Source()),
targetFunctionDeclarator, existingParamIndex))
replacementName = 0;
diff --git a/src/plugins/cpptools/cppcodegen_test.cpp b/src/plugins/cpptools/cppcodegen_test.cpp
index 3bbdaf1e30..df07ce5d2d 100644
--- a/src/plugins/cpptools/cppcodegen_test.cpp
+++ b/src/plugins/cpptools/cppcodegen_test.cpp
@@ -72,7 +72,7 @@ void CppToolsPlugin::test_codegen_public_in_empty_class()
"\n";
Document::Ptr doc = Document::create("public_in_empty_class");
- doc->setSource(src);
+ doc->setUtf8Source(src);
doc->parse();
doc->check();
@@ -112,7 +112,7 @@ void CppToolsPlugin::test_codegen_public_in_nonempty_class()
"\n";
Document::Ptr doc = Document::create("public_in_nonempty_class");
- doc->setSource(src);
+ doc->setUtf8Source(src);
doc->parse();
doc->check();
@@ -152,7 +152,7 @@ void CppToolsPlugin::test_codegen_public_before_protected()
"\n";
Document::Ptr doc = Document::create("public_before_protected");
- doc->setSource(src);
+ doc->setUtf8Source(src);
doc->parse();
doc->check();
@@ -193,7 +193,7 @@ void CppToolsPlugin::test_codegen_private_after_protected()
"\n";
Document::Ptr doc = Document::create("private_after_protected");
- doc->setSource(src);
+ doc->setUtf8Source(src);
doc->parse();
doc->check();
@@ -234,7 +234,7 @@ void CppToolsPlugin::test_codegen_protected_in_nonempty_class()
"\n";
Document::Ptr doc = Document::create("protected_in_nonempty_class");
- doc->setSource(src);
+ doc->setUtf8Source(src);
doc->parse();
doc->check();
@@ -275,7 +275,7 @@ void CppToolsPlugin::test_codegen_protected_between_public_and_private()
"\n";
Document::Ptr doc = Document::create("protected_betwee_public_and_private");
- doc->setSource(src);
+ doc->setUtf8Source(src);
doc->parse();
doc->check();
@@ -336,7 +336,7 @@ void CppToolsPlugin::test_codegen_qtdesigner_integration()
"#endif // MAINWINDOW_H\n";
Document::Ptr doc = Document::create("qtdesigner_integration");
- doc->setSource(src);
+ doc->setUtf8Source(src);
doc->parse();
doc->check();
@@ -380,7 +380,7 @@ void CppToolsPlugin::test_codegen_definition_empty_class()
Utils::FileSaver srcSaver(src->fileName());
srcSaver.write(srcText);
srcSaver.finalize();
- src->setSource(srcText);
+ src->setUtf8Source(srcText);
src->parse();
src->check();
QCOMPARE(src->diagnosticMessages().size(), 0);
@@ -390,7 +390,7 @@ void CppToolsPlugin::test_codegen_definition_empty_class()
Utils::FileSaver dstSaver(dst->fileName());
dstSaver.write(dstText);
dstSaver.finalize();
- dst->setSource(dstText);
+ dst->setUtf8Source(dstText);
dst->parse();
dst->check();
QCOMPARE(dst->diagnosticMessages().size(), 0);
@@ -448,7 +448,7 @@ void CppToolsPlugin::test_codegen_definition_first_member()
Utils::FileSaver srcSaver(src->fileName());
srcSaver.write(srcText);
srcSaver.finalize();
- src->setSource(srcText);
+ src->setUtf8Source(srcText);
src->parse();
src->check();
QCOMPARE(src->diagnosticMessages().size(), 0);
@@ -459,7 +459,7 @@ void CppToolsPlugin::test_codegen_definition_first_member()
Utils::FileSaver dstSaver(dst->fileName());
dstSaver.write(dstText);
dstSaver.finalize();
- dst->setSource(dstText);
+ dst->setUtf8Source(dstText);
dst->parse();
dst->check();
QCOMPARE(dst->diagnosticMessages().size(), 0);
@@ -517,7 +517,7 @@ void CppToolsPlugin::test_codegen_definition_last_member()
Utils::FileSaver srcSaver(src->fileName());
srcSaver.write(srcText);
srcSaver.finalize();
- src->setSource(srcText);
+ src->setUtf8Source(srcText);
src->parse();
src->check();
QCOMPARE(src->diagnosticMessages().size(), 0);
@@ -528,7 +528,7 @@ void CppToolsPlugin::test_codegen_definition_last_member()
Utils::FileSaver dstSaver(dst->fileName());
dstSaver.write(dstText);
dstSaver.finalize();
- dst->setSource(dstText);
+ dst->setUtf8Source(dstText);
dst->parse();
dst->check();
QCOMPARE(dst->diagnosticMessages().size(), 0);
@@ -592,7 +592,7 @@ void CppToolsPlugin::test_codegen_definition_middle_member()
Utils::FileSaver srcSaver(src->fileName());
srcSaver.write(srcText);
srcSaver.finalize();
- src->setSource(srcText);
+ src->setUtf8Source(srcText);
src->parse();
src->check();
QCOMPARE(src->diagnosticMessages().size(), 0);
@@ -603,7 +603,7 @@ void CppToolsPlugin::test_codegen_definition_middle_member()
Utils::FileSaver dstSaver(dst->fileName());
dstSaver.write(dstText);
dstSaver.finalize();
- dst->setSource(dstText);
+ dst->setUtf8Source(dstText);
dst->parse();
dst->check();
QCOMPARE(dst->diagnosticMessages().size(), 0);
diff --git a/src/plugins/cpptools/cppcompletionassist.cpp b/src/plugins/cpptools/cppcompletionassist.cpp
index ca17afe2ce..cd6e14be59 100644
--- a/src/plugins/cpptools/cppcompletionassist.cpp
+++ b/src/plugins/cpptools/cppcompletionassist.cpp
@@ -1844,7 +1844,7 @@ bool CppCompletionAssistProcessor::completeConstructorOrFunction(const QList<CPl
QString possibleDecl = bs.mid(lineStartToken).trimmed().append("();");
Document::Ptr doc = Document::create(QLatin1String("<completion>"));
- doc->setSource(possibleDecl.toLatin1());
+ doc->setUtf8Source(possibleDecl.toLatin1());
if (doc->parse(Document::ParseDeclaration)) {
doc->check();
if (SimpleDeclarationAST *sd = doc->translationUnit()->ast()->asSimpleDeclaration()) {
diff --git a/src/plugins/cpptools/cppmodelmanager.cpp b/src/plugins/cpptools/cppmodelmanager.cpp
index 8e0b79cf3f..bf676e26e3 100644
--- a/src/plugins/cpptools/cppmodelmanager.cpp
+++ b/src/plugins/cpptools/cppmodelmanager.cpp
@@ -589,7 +589,7 @@ void CppPreprocessor::sourceNeeded(QString &fileName, IncludeType type, unsigned
const QByteArray preprocessedCode = preprocess(fileName, contents);
- doc->setSource(preprocessedCode);
+ doc->setUtf8Source(preprocessedCode);
doc->keepSourceAndAST();
doc->tokenize();
diff --git a/src/plugins/cpptools/doxygengenerator.cpp b/src/plugins/cpptools/doxygengenerator.cpp
index 8e3df8d6b8..9883ceb322 100644
--- a/src/plugins/cpptools/doxygengenerator.cpp
+++ b/src/plugins/cpptools/doxygengenerator.cpp
@@ -82,7 +82,7 @@ QString DoxygenGenerator::generate(QTextCursor cursor)
declCandidate.append(QLatin1Char('}'));
Document::Ptr doc = Document::create(QLatin1String("<doxygen>"));
- doc->setSource(declCandidate.toUtf8());
+ doc->setUtf8Source(declCandidate.toUtf8());
doc->parse(Document::ParseDeclaration);
doc->check(Document::FastCheck);
diff --git a/src/plugins/qmljstools/qmljsfindexportedcpptypes.cpp b/src/plugins/qmljstools/qmljsfindexportedcpptypes.cpp
index e266f76b11..fe7c95b5c4 100644
--- a/src/plugins/qmljstools/qmljsfindexportedcpptypes.cpp
+++ b/src/plugins/qmljstools/qmljsfindexportedcpptypes.cpp
@@ -264,7 +264,7 @@ protected:
// and the expression
const Token begin = translationUnit()->tokenAt(typeId->firstToken());
const Token last = translationUnit()->tokenAt(typeId->lastToken() - 1);
- exportedType.typeExpression = _doc->source().mid(begin.begin(), last.end() - begin.begin());
+ exportedType.typeExpression = _doc->utf8Source().mid(begin.begin(), last.end() - begin.begin());
_exportedTypes += exportedType;
@@ -392,12 +392,12 @@ private:
{
const Token firstToken = translationUnit()->tokenAt(first);
const Token lastToken = translationUnit()->tokenAt(last);
- return _doc->source().mid(firstToken.begin(), lastToken.end() - firstToken.begin());
+ return _doc->utf8Source().mid(firstToken.begin(), lastToken.end() - firstToken.begin());
}
QString stringOf(const Token &token)
{
- return _doc->source().mid(token.begin(), token.length());
+ return _doc->utf8Source().mid(token.begin(), token.length());
}
ExpressionAST *skipStringCall(ExpressionAST *exp)
@@ -689,7 +689,7 @@ void FindExportedCppTypes::operator()(const CPlusPlus::Document::Ptr &document)
// this check only guards against some input errors, if document's source and AST has not
// been guarded properly the source and AST may still become empty/null while this function is running
- if (document->source().isEmpty()
+ if (document->utf8Source().isEmpty()
|| !document->translationUnit()->ast())
return;
@@ -710,7 +710,7 @@ void FindExportedCppTypes::operator()(const CPlusPlus::Document::Ptr &document)
// context properties need lookup inside function scope, and thus require a full check
Document::Ptr localDoc = document;
if (document->checkMode() != Document::FullCheck && !contextPropertyDescriptions.isEmpty()) {
- localDoc = m_snapshot.documentFromSource(document->source(), document->fileName());
+ localDoc = m_snapshot.documentFromSource(document->utf8Source(), document->fileName());
localDoc->check();
}
diff --git a/src/plugins/qmljstools/qmljsmodelmanager.cpp b/src/plugins/qmljstools/qmljsmodelmanager.cpp
index beb90c1ed2..19acd74606 100644
--- a/src/plugins/qmljstools/qmljsmodelmanager.cpp
+++ b/src/plugins/qmljstools/qmljsmodelmanager.cpp
@@ -710,7 +710,7 @@ void ModelManager::maybeQueueCppQmlTypeUpdate(const CPlusPlus::Document::Ptr &do
{
// avoid scanning documents without source code available
doc->keepSourceAndAST();
- if (doc->source().isEmpty()) {
+ if (doc->utf8Source().isEmpty()) {
doc->releaseSourceAndAST();
return;
}
diff --git a/src/tools/gen-cpp-ast/generate-ast.cpp b/src/tools/gen-cpp-ast/generate-ast.cpp
index 1541872dc3..d0dbca1c1d 100644
--- a/src/tools/gen-cpp-ast/generate-ast.cpp
+++ b/src/tools/gen-cpp-ast/generate-ast.cpp
@@ -1069,7 +1069,7 @@ void generateAST_cpp(const Snapshot &snapshot, const QDir &cplusplusDir)
Document::Ptr AST_cpp_document = Document::create(fileName);
const QByteArray preprocessedCode = snapshot.preprocessedCode(source, fileName);
- AST_cpp_document->setSource(preprocessedCode);
+ AST_cpp_document->setUtf8Source(preprocessedCode);
AST_cpp_document->check();
Overview oo;
@@ -1373,7 +1373,7 @@ QStringList generateAST_H(const Snapshot &snapshot, const QDir &cplusplusDir, co
AST_h_document = Document::create(fileName);
const QByteArray preprocessedCode = snapshot.preprocessedCode(source, fileName);
- AST_h_document->setSource(preprocessedCode);
+ AST_h_document->setUtf8Source(preprocessedCode);
AST_h_document->check();
FindASTNodes process(AST_h_document, &document);
@@ -1520,7 +1520,7 @@ void generateASTFwd_h(const Snapshot &snapshot, const QDir &cplusplusDir, const
Document::Ptr doc = Document::create(fileName);
const QByteArray preprocessedCode = snapshot.preprocessedCode(source, fileName);
- doc->setSource(preprocessedCode);
+ doc->setUtf8Source(preprocessedCode);
doc->check();
FindASTForwards process(doc, &document);
diff --git a/tests/auto/cplusplus/findusages/tst_findusages.cpp b/tests/auto/cplusplus/findusages/tst_findusages.cpp
index 912e20aa6b..10107eb3f3 100644
--- a/tests/auto/cplusplus/findusages/tst_findusages.cpp
+++ b/tests/auto/cplusplus/findusages/tst_findusages.cpp
@@ -100,7 +100,7 @@ void tst_FindUsages::inlineMethod()
" }\n"
"};\n";
Document::Ptr doc = Document::create("inlineMethod");
- doc->setSource(src);
+ doc->setUtf8Source(src);
doc->parse();
doc->check();
@@ -143,7 +143,7 @@ const QByteArray objcSource = "\n"
void tst_FindUsages::objc_args()
{
Document::Ptr doc = Document::create("objc_args");
- doc->setSource(objcSource);
+ doc->setUtf8Source(objcSource);
doc->parse();
doc->check();
@@ -199,7 +199,7 @@ void tst_FindUsages::qproperty_1()
" int _x;\n"
"};\n";
Document::Ptr doc = Document::create("qproperty_1");
- doc->setSource(src);
+ doc->setUtf8Source(src);
doc->parse();
doc->check();
diff --git a/tests/auto/cplusplus/lookup/tst_lookup.cpp b/tests/auto/cplusplus/lookup/tst_lookup.cpp
index 570b386c88..a4d3b9d295 100644
--- a/tests/auto/cplusplus/lookup/tst_lookup.cpp
+++ b/tests/auto/cplusplus/lookup/tst_lookup.cpp
@@ -114,7 +114,7 @@ void tst_Lookup::base_class_defined_1()
"class derived: public base {};\n";
Document::Ptr doc = Document::create("base_class_defined_1");
- doc->setSource(source);
+ doc->setUtf8Source(source);
doc->parse();
doc->check();
@@ -163,7 +163,7 @@ void tst_Lookup::simple_class_1()
"@implementation Zoo +(id)alloc{} -(id)init{} -(void)dealloc{} @end\n";
Document::Ptr doc = Document::create("simple_class_1");
- doc->setSource(source);
+ doc->setUtf8Source(source);
doc->parse();
doc->check();
@@ -226,7 +226,7 @@ void tst_Lookup::class_with_baseclass()
"@implementation Zoo +(id)alloc{} -(id)init{} -(void)dealloc{} @end\n";
Document::Ptr doc = Document::create("class_with_baseclass");
- doc->setSource(source);
+ doc->setUtf8Source(source);
doc->parse();
doc->check();
@@ -287,7 +287,7 @@ void tst_Lookup::class_with_protocol_with_protocol()
"@implementation Zoo +(id)alloc{} -(id)init{} -(void)dealloc{} @end\n";
Document::Ptr doc = Document::create("class_with_protocol_with_protocol");
- doc->setSource(source);
+ doc->setUtf8Source(source);
doc->parse();
doc->check();
@@ -341,7 +341,7 @@ void tst_Lookup::iface_impl_scoping()
"@implementation Scooping-(int)method1:(int)arg{return arg;}@end\n";
Document::Ptr doc = Document::create("class_with_protocol_with_protocol");
- doc->setSource(source);
+ doc->setUtf8Source(source);
doc->parse();
doc->check();
@@ -431,7 +431,7 @@ void tst_Lookup::templates_1()
" l.end(); // std::_List_iterator<Point>\n"
"}\n";
Document::Ptr doc = Document::create("templates_1");
- doc->setSource(source);
+ doc->setUtf8Source(source);
doc->parse();
doc->check();
@@ -462,7 +462,7 @@ void tst_Lookup::templates_2()
"}\n"
;
Document::Ptr doc = Document::create("templates_2");
- doc->setSource(source);
+ doc->setUtf8Source(source);
doc->parse();
doc->check();
@@ -487,7 +487,7 @@ void tst_Lookup::templates_3()
" l.at(0); // const Point &\n"
"}\n";
Document::Ptr doc = Document::create("templates_3");
- doc->setSource(source);
+ doc->setUtf8Source(source);
doc->parse();
doc->check();
@@ -528,7 +528,7 @@ void tst_Lookup::templates_4()
" (*l); // Point &\n"
"}\n";
Document::Ptr doc = Document::create("templates_4");
- doc->setSource(source);
+ doc->setUtf8Source(source);
doc->parse();
doc->check();
@@ -558,7 +558,7 @@ void tst_Lookup::templates_5()
" a.get(); // const Point &\n"
"}\n";
Document::Ptr doc = Document::create("templates_5");
- doc->setSource(source);
+ doc->setUtf8Source(source);
doc->parse();
doc->check();
diff --git a/tests/auto/cplusplus/misc/tst_misc.cpp b/tests/auto/cplusplus/misc/tst_misc.cpp
index 666f47bbae..8b5df6e9da 100644
--- a/tests/auto/cplusplus/misc/tst_misc.cpp
+++ b/tests/auto/cplusplus/misc/tst_misc.cpp
@@ -59,7 +59,7 @@ void tst_Misc::diagnosticClient_error()
);
Document::Ptr doc = Document::create("diagnosticClient_error");
QVERIFY(!doc.isNull());
- doc->setSource(src);
+ doc->setUtf8Source(src);
bool success = doc->parse(Document::ParseTranlationUnit);
QVERIFY(success);
@@ -79,7 +79,7 @@ void tst_Misc::diagnosticClient_warning()
);
Document::Ptr doc = Document::create("diagnosticClient_warning");
QVERIFY(!doc.isNull());
- doc->setSource(src);
+ doc->setUtf8Source(src);
bool success = doc->parse(Document::ParseTranlationUnit);
QVERIFY(success);
@@ -132,7 +132,7 @@ void tst_Misc::findBreakpoints()
);
Document::Ptr doc = Document::create("findContstructorBreakpoint");
QVERIFY(!doc.isNull());
- doc->setSource(src);
+ doc->setUtf8Source(src);
bool success = doc->parse();
QVERIFY(success);
QCOMPARE(doc->diagnosticMessages().size(), 0);
@@ -161,7 +161,7 @@ void tst_Misc::findBreakpoints2()
);
Document::Ptr doc = Document::create("findContstructorBreakpoint");
QVERIFY(!doc.isNull());
- doc->setSource(src);
+ doc->setUtf8Source(src);
bool success = doc->parse();
QVERIFY(success);
QCOMPARE(doc->diagnosticMessages().size(), 0);