MCPcopy Create free account
hub / github.com/KDE/kdevelop / defaultSample

Function defaultSample

plugins/customscript/customscript_plugin.cpp:328–417  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

326}
327
328static QString defaultSample()
329{
330 return QStringLiteral(
331 "// Formatting\n"
332 "void func(){\n"
333 "\tif(isFoo(a,b))\n"
334 "\tbar(a,b);\n"
335 "if(isFoo)\n"
336 "\ta=bar((b-c)*a,*d--);\n"
337 "if( isFoo( a,b ) )\n"
338 "\tbar(a, b);\n"
339 "if (isFoo) {isFoo=false;cat << isFoo <<endl;}\n"
340 "if(isFoo)DoBar();if (isFoo){\n"
341 "\tbar();\n"
342 "}\n"
343 "\telse if(isBar()){\n"
344 "\tannotherBar();\n"
345 "}\n"
346 "int var = 1;\n"
347 "int *ptr = &var;\n"
348 "int &ref = i;\n"
349 "\n"
350 "QList<int>::const_iterator it = list.begin();\n"
351 "}\n"
352 "namespace A {\n"
353 "namespace B {\n"
354 "void foo() {\n"
355 " if (true) {\n"
356 " func();\n"
357 " } else {\n"
358 " // bla\n"
359 " }\n"
360 "}\n"
361 "}\n"
362 "}\n"
363
364 "\n\n"
365 "// Indentation\n"
366 "#define foobar(A)\\\n"
367 "{Foo();Bar();}\n"
368 "#define anotherFoo(B)\\\n"
369 "return Bar()\n"
370 "\n"
371 "namespace Bar\n"
372 "{\n"
373 "class Foo\n"
374 "{public:\n"
375 "Foo();\n"
376 "virtual ~Foo();\n"
377 "};\n"
378 "void bar(int foo)\n"
379 "{\n"
380 "switch (foo)\n"
381 "{\n"
382 "case 1:\n"
383 "a+=1;\n"
384 "break;\n"
385 "case 2:\n"

Callers 1

previewTextMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected