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

Function initCommands

plugins/cmake/duchain/usebuilder.cpp:12–20  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

10#include <language/duchain/declaration.h>
11
12static QSet<QString> initCommands()
13{
14 QStringList ids = CMake::executeProcess(QStringLiteral("cmake"), QStringList(QStringLiteral("--help-command-list"))).split(QLatin1Char('\n'));
15 if (ids.isEmpty()) {
16 return {};
17 }
18 const auto secondIt = ids.constBegin() + 1;
19 return QSet<QString>(secondIt, ids.constEnd());
20}
21
22// TODO: maybe share this again with codecompletionmodel and documentation
23Q_GLOBAL_STATIC_WITH_ARGS(QSet<QString>, s_commands, (initCommands()))

Callers 1

usebuilder.cppFile · 0.85

Calls 6

executeProcessFunction · 0.85
QStringListClass · 0.85
constBeginMethod · 0.80
constEndMethod · 0.80
splitMethod · 0.45
isEmptyMethod · 0.45

Tested by

no test coverage detected