| 168 | } |
| 169 | |
| 170 | bool 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 | |
| 189 | MakeFileResolver::MakeFileResolver() |
| 190 |
nothing calls this directly
no test coverage detected