MCPcopy Create free account
hub / github.com/IChooseYou/Reclass / commandRowSrcSpan

Function commandRowSrcSpan

tests/test_command_row.cpp:34–46  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

32};
33
34static TestColumnSpan commandRowSrcSpan(const QString& lineText) {
35 int idx = lineText.indexOf(QStringLiteral(" \u00B7"));
36 if (idx < 0) return {};
37 int start = 0;
38 while (start < idx && !lineText[start].isLetterOrNumber()
39 && lineText[start] != '<' && lineText[start] != '\'') start++;
40 if (start >= idx) return {};
41 // Exclude trailing ▾ from the editable span
42 int end = idx;
43 while (end > start && lineText[end - 1] == QChar(0x25BE)) end--;
44 if (end <= start) return {};
45 return {start, end, true};
46}
47
48class TestCommandRow : public QObject {
49 Q_OBJECT

Callers 4

testSpansWithPrefixMethod · 0.70
span_selectSourceMethod · 0.70
span_fileProviderMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected