forked from qt-creator/qt-creator
C++: Rename source/setSource to utf8Source/setUtf8Source
Continuinng a previous commit... This is in order to make the interface clearer. Change-Id: Ic1b05217f878578bc84a064927507b75981c47d6 Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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()) {
|
||||
|
||||
@@ -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();
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user