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

Function indentingCppSample

plugins/astyle/astyle_plugin.cpp:95–149  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

93}
94
95QString indentingCppSample()
96{
97 return QStringLiteral(
98 "#define foobar(A)\\\n"
99 "{Foo();Bar();}\n"
100 "#define anotherFoo(B)\\\n"
101 "return Bar()\n"
102 "\n"
103 "namespace Bar\n"
104 "{\n"
105 "class Foo\n"
106 "{public:\n"
107 "Foo();\n"
108 "virtual ~Foo();\n"
109 "};\n"
110 "void bar(int foo)\n"
111 "{\n"
112 "switch (foo)\n"
113 "{\n"
114 "case 1:\n"
115 "a+=1;\n"
116 "break;\n"
117 "case 2:\n"
118 "{\n"
119 "a += 2;\n"
120 " break;\n"
121 "}\n"
122 "}\n"
123 "if (isFoo)\n"
124 "{\n"
125 "bar();\n"
126 "}\n"
127 "else\n"
128 "{\n"
129 "anotherBar();\n"
130 "}\n"
131 "}\n"
132 "int foo()\n"
133 "\twhile(isFoo)\n"
134 "\t\t{\n"
135 "\t\t\t// ...\n"
136 "\t\t\tgoto error;\n"
137 "\t\t/* .... */\n"
138 "\t\terror:\n"
139 "\t\t\t//...\n"
140 "\t\t}\n"
141 "\t}\n"
142 "fooArray[]={ red,\n"
143 "\tgreen,\n"
144 "\tdarkblue};\n"
145 "fooFunction(barArg1,\n"
146 "\tbarArg2,\n"
147 "\tbarArg3);\n"
148 "struct foo{ int bar() {} };\n");
149}
150
151QString indentingObjCSample()
152{

Callers 2

previewTextMethod · 0.85
indentingSampleMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected