| 34 | }; |
| 35 | |
| 36 | CMakeCommandsContents::CMakeCommandsContents(QObject* parent) |
| 37 | : QAbstractItemModel(parent) |
| 38 | , m_namesForType(CMakeDocumentation::EOType) |
| 39 | { |
| 40 | for (int i = 0; i <= CMakeDocumentation::Policy; ++i) { |
| 41 | const QStringList params = { args[i]+QStringLiteral("-list") }; |
| 42 | |
| 43 | auto* process = new QProcess(this); |
| 44 | process->setProperty("type", i); |
| 45 | process->setProgram(CMakeBuilderSettings::self()->cmakeExecutable().toLocalFile()); |
| 46 | process->setArguments(params); |
| 47 | KDevelop::ICore::self()->runtimeController()->currentRuntime()->startProcess(process); |
| 48 | |
| 49 | connect(process, QOverload<int, QProcess::ExitStatus>::of(&QProcess::finished), |
| 50 | this, &CMakeCommandsContents::processOutput); |
| 51 | } |
| 52 | } |
| 53 | |
| 54 | void CMakeCommandsContents::processOutput(int code) |
| 55 | { |
nothing calls this directly
no test coverage detected