| 43 | } |
| 44 | |
| 45 | void HelpControllerPrivate::startProcess() |
| 46 | { |
| 47 | if (proc) |
| 48 | return; |
| 49 | |
| 50 | proc = new QProcess(QCoreApplication::instance()); |
| 51 | proc->setProcessChannelMode(QProcess::ForwardedChannels); |
| 52 | QObject::connect(proc, |
| 53 | static_cast<void (QProcess::*)(int, |
| 54 | QProcess::ExitStatus)>(&QProcess::finished), |
| 55 | proc, |
| 56 | [this]() { |
| 57 | proc->deleteLater(); |
| 58 | proc = nullptr; |
| 59 | }); |
| 60 | proc->setProgram(assistantPath); |
| 61 | proc->setArguments(QStringList() |
| 62 | << QLatin1String("-collectionFile") |
| 63 | << qhcPath |
| 64 | << QLatin1String("-enableRemoteControl")); |
| 65 | proc->start(); |
| 66 | proc->waitForStarted(); |
| 67 | sendCommand("expandToc 2;"); |
| 68 | } |
| 69 | |
| 70 | void HelpControllerPrivate::sendCommand(const QByteArray &cmd) const |
| 71 | { |
no test coverage detected