MCPcopy Create free account
hub / github.com/Serial-Studio/Serial-Studio / clear

Method clear

lib/QCodeEditor/src/internal/QFramedTextAttribute.cpp:84–105  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

82}
83
84void QFramedTextAttribute::clear(QTextCursor cursor)
85{
86 auto doc = cursor.document();
87
88 for (auto blockIndex = 0; blockIndex < doc->blockCount(); ++blockIndex)
89 {
90 auto block = doc->findBlockByNumber(blockIndex);
91
92 auto formats = block.textFormats();
93 int offset = 0;
94
95 for (auto &format : formats)
96 {
97 if (format.format.objectType() == type())
98 {
99 cursor.setPosition(block.position() + format.start - offset);
100 cursor.deleteChar();
101 ++offset;
102 }
103 }
104 }
105}

Callers 15

~QSimpleUpdaterMethod · 0.45
entryInfoListMethod · 0.45
clearDirectoryMapMethod · 0.45
TEST_FFunction · 0.45
TESTFunction · 0.45
SetUpTestSuiteMethod · 0.45
TESTFunction · 0.45
SetUpTestSuiteMethod · 0.45
OnInitMethod · 0.45
RedrawListViewMethod · 0.45

Calls

no outgoing calls

Tested by 5

TEST_FFunction · 0.36
TESTFunction · 0.36
SetUpTestSuiteMethod · 0.36
TESTFunction · 0.36
SetUpTestSuiteMethod · 0.36