Details
-
Bug
-
Resolution: Unresolved
-
P1: Critical
-
None
-
5.15.2
-
None
Description
We use remote controlling of the Help Assistant via -enableRemoteControl.
When we open the first page just after the Assistant is started, the tree is not opened, despite calling syncContents.
However with the version 5.9.3 Assistant this works fine.
If we add a waitdelay/sleep of 1 second just after starting the Help Assistant and before we open the page, opening the tree seems to work most of the times.
The tree is also opened after going to the same page again via remote control when the Assistant is already opened.
The tree is also opened after clicking the Sync-button in Assistant toolbar.
(The tree is NOT opened after clicking the Reload-option in the contextmenu of the helppage.)
(I noticed that the Assistant of version of 5.9.3 also starts bit slower)
bool HelpAssistant::startApp() { if (m_pProc == nullptr) { m_pProc = new QProcess(); } if (m_pProc->state() == QProcess::NotRunning) { QStringList args; args << QLatin1String("-collectionFile ourhelp.qhc -enableRemoteControl"); m_pProc->start(QLatin1String("assistant.exe"), args); if (!m_pProc->waitForStarted()) return false; //QThread::msleep(1000);// workaround for not opening tree directly after starting assistant when opening first page } return true; } void HelpAssistant::goToPage(const QString& page) { QByteArray ba; ba.append("setSource qthelp://com.ourcompany.ourapp/doc/" + page.toLocal8Bit() + ";"); ba.append("syncContents;");// show item in tree ba.append("\n"); m_pProc->write(ba); } if (startApp()) goToPage("somepage.html");