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

Method executeCommand

plugins/custommake/makefileresolver/makefileresolver.cpp:170–187  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

168}
169
170bool MakeFileResolver::executeCommand(const QString& command, const QString& workingDirectory, QString& result) const
171{
172 ifTest(cout << "executing " << command.toUtf8().constData() << endl);
173 ifTest(cout << "in " << workingDirectory.toUtf8().constData() << endl);
174
175 KProcess proc;
176 proc.setWorkingDirectory(workingDirectory);
177 proc.setOutputChannelMode(KProcess::MergedChannels);
178
179 QStringList args(command.split(QLatin1Char(' ')));
180 QString prog = args.takeFirst();
181 proc.setProgram(prog, args);
182
183 int status = proc.execute(processTimeoutSeconds * 1000);
184 result = QString::fromUtf8(proc.readAll());
185
186 return status == 0;
187}
188
189MakeFileResolver::MakeFileResolver()
190

Callers

nothing calls this directly

Calls 3

setWorkingDirectoryMethod · 0.45
splitMethod · 0.45
executeMethod · 0.45

Tested by

no test coverage detected