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

Method updateCommandLine

plugins/clazy/config/commandlinewidget.cpp:37–60  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

35}
36
37void CommandLineWidget::updateCommandLine()
38{
39 auto commandLine = m_text;
40 if (m_ui->cmdBreak->isChecked()) {
41 commandLine.replace(QLatin1String(" -"), QLatin1String("\n-"));
42 commandLine.replace(QLatin1String(","), QLatin1String("\n,"));
43 }
44
45 auto filterText = m_ui->cmdFilter->text();
46 if (!filterText.isEmpty()) {
47 QStringList lines = commandLine.split(QLatin1Char('\n'));
48 QMutableStringListIterator i(lines);
49
50 while (i.hasNext()) {
51 if (!i.next().contains(filterText)) {
52 i.remove();
53 }
54 }
55
56 commandLine = lines.join(QLatin1Char('\n'));
57 }
58
59 m_ui->cmdEdit->setPlainText(commandLine);
60}
61
62}
63

Callers

nothing calls this directly

Calls 9

joinMethod · 0.80
replaceMethod · 0.45
textMethod · 0.45
isEmptyMethod · 0.45
splitMethod · 0.45
hasNextMethod · 0.45
containsMethod · 0.45
nextMethod · 0.45
removeMethod · 0.45

Tested by

no test coverage detected