Adjust the demo text of editor color theme optiont page. (#438)
This commit is contained in:
parent
a236c6f558
commit
65784daefd
|
@ -71,30 +71,30 @@ EditorColorSchemeWidget::EditorColorSchemeWidget(const QString& name, const QStr
|
||||||
"#include <iostream>\n"
|
"#include <iostream>\n"
|
||||||
"#include <conio.h>\n"
|
"#include <conio.h>\n"
|
||||||
"\n"
|
"\n"
|
||||||
"int1 x=10;\n"
|
"int x=10;\n"
|
||||||
"int yyy=10;\n"
|
"\n"
|
||||||
"//Demo text\n"
|
|
||||||
"int main(int argc, char **argv)\n"
|
"int main(int argc, char **argv)\n"
|
||||||
"{\n"
|
"{\n"
|
||||||
" int numbers[20];\n"
|
" int numbers[20]; // warning line\n"
|
||||||
" float average, total; //breakpoint\n"
|
" float average, total; // bookmark\n"
|
||||||
" for (int i = 0; i <= 19; i++)\n"
|
" for (int i = 0; i <= 19; i++) // active breakpoint\n"
|
||||||
" { // active breakpoint\n"
|
" { // breakpoint\n"
|
||||||
" numbers[i] = i+x;\n"
|
" numbers[i] = i+x;\n"
|
||||||
" Total += i; // error line\n"
|
" Total += i; // error line\n"
|
||||||
" }\n"
|
" }\n"
|
||||||
" average = total / 20; // comment\n"
|
" average = total / 20; // comment\n"
|
||||||
" cout << \"total: \" << total << \"\nAverage: \" << average;\n"
|
" std::cout << \"total: \" << total <<\n"
|
||||||
|
" \"\\nAverage: \" << average;\n"
|
||||||
" getch();\n"
|
" getch();\n"
|
||||||
"}\n"
|
"}\n"
|
||||||
);
|
);
|
||||||
ui->editDemo->setReadOnly(true);
|
ui->editDemo->setReadOnly(true);
|
||||||
ui->editDemo->toggleBreakpoint(9);
|
ui->editDemo->toggleBreakpoint(11);
|
||||||
ui->editDemo->toggleBookmark(10);
|
ui->editDemo->toggleBookmark(9);
|
||||||
ui->editDemo->addSyntaxIssues(4, 1, 5, CompileIssueType::Error, "Wrong type");
|
ui->editDemo->addSyntaxIssues(13, 9, 14, CompileIssueType::Error, "[Error] 'Total' was not declared in this scope; did you mean 'total'?");
|
||||||
ui->editDemo->addSyntaxIssues(5, 5, 8, CompileIssueType::Warning, "Variable y defined but not used.");
|
ui->editDemo->addSyntaxIssues(8, 9, 16, CompileIssueType::Warning, "[Warning] variable 'numbers' set but not used [-Wunused-but-set-variable]");
|
||||||
ui->editDemo->setCaretY(10);
|
ui->editDemo->setCaretY(9);
|
||||||
ui->editDemo->setActiveBreakpointFocus(11,false);
|
ui->editDemo->setActiveBreakpointFocus(10,false);
|
||||||
ui->editDemo->reparseDocument();
|
ui->editDemo->reparseDocument();
|
||||||
ui->editDemo->invalidate();
|
ui->editDemo->invalidate();
|
||||||
onItemSelectionChanged();
|
onItemSelectionChanged();
|
||||||
|
|
Loading…
Reference in New Issue