Skip to content

Commit 3f2f403

Browse files
Alexander Volkovec1oud
Alexander Volkov
authored andcommitted
Assistant: Fix index updating on startup in the remote control mode
HelpEngineWrapper::initialDocSetupDone() should be called only once right after the initialization of the help models. Calling it on every small update leads to recursion. Task-number: QTBUG-36850 (cherry picked from qttools/d55407822eefbc05f7d8bb44c53b057332b5b399) Change-Id: I3e0390e592069a417d88fbc202a1e45cd91cc139 Reviewed-by: Shawn Rutledge <[email protected]>
1 parent 363c9ab commit 3f2f403

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

tools/assistant/tools/assistant/mainwindow.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -398,9 +398,10 @@ void MainWindow::qtDocumentationInstalled()
398398
void MainWindow::checkInitState()
399399
{
400400
TRACE_OBJ
401-
HelpEngineWrapper::instance().initialDocSetupDone();
402-
if (!m_cmdLine->enableRemoteControl())
401+
if (!m_cmdLine->enableRemoteControl()) {
402+
HelpEngineWrapper::instance().initialDocSetupDone();
403403
return;
404+
}
404405

405406
HelpEngineWrapper &helpEngine = HelpEngineWrapper::instance();
406407
if (helpEngine.contentModel()->isCreatingContents()
@@ -417,6 +418,7 @@ void MainWindow::checkInitState()
417418
disconnect(helpEngine.contentModel(), 0, this, 0);
418419
disconnect(helpEngine.indexModel(), 0, this, 0);
419420
}
421+
HelpEngineWrapper::instance().initialDocSetupDone();
420422
emit initDone();
421423
}
422424
}

0 commit comments

Comments
 (0)