Changeset View
Changeset View
Standalone View
Standalone View
autotests/src/katedocument_test.cpp
Show First 20 Lines • Show All 91 Lines • ▼ Show 20 Line(s) | 284 | { | |||
---|---|---|---|---|---|
287 | 287 | | |||
288 | auto reset = [&]() { | 288 | auto reset = [&]() { | ||
289 | doc.setText(" Hi!"); | 289 | doc.setText(" Hi!"); | ||
290 | view->setCursorPosition(Cursor(0, 0)); | 290 | view->setCursorPosition(Cursor(0, 0)); | ||
291 | }; | 291 | }; | ||
292 | 292 | | |||
293 | doc.setHighlightingMode ("C++"); | 293 | doc.setHighlightingMode ("C++"); | ||
294 | doc.config()->setTabWidth(4); | 294 | doc.config()->setTabWidth(4); | ||
295 | doc.config()->setIndentationMode("cppstyle"); | 295 | doc.config()->set("Indentation Mode", "cppstyle"); | ||
296 | 296 | | |||
297 | // no replace tabs, no indent pasted text | 297 | // no replace tabs, no indent pasted text | ||
298 | doc.setConfigValue("replace-tabs", false); | 298 | doc.setConfigValue("replace-tabs", false); | ||
299 | doc.setConfigValue("indent-pasted-text", false); | 299 | doc.setConfigValue("indent-pasted-text", false); | ||
300 | 300 | | |||
301 | reset(); | 301 | reset(); | ||
302 | doc.insertText(Cursor(0, 0), "\t"); | 302 | doc.insertText(Cursor(0, 0), "\t"); | ||
303 | QCOMPARE(doc.text(), QStringLiteral("\t Hi!")); | 303 | QCOMPARE(doc.text(), QStringLiteral("\t Hi!")); | ||
▲ Show 20 Lines • Show All 91 Lines • Show Last 20 Lines |