From 3f2f403191ea5a38c66b79840e3a33e05827d580 Mon Sep 17 00:00:00 2001 From: Alexander Volkov Date: Fri, 19 Sep 2014 13:52:42 +0400 Subject: 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 --- tools/assistant/tools/assistant/mainwindow.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tools/assistant/tools/assistant/mainwindow.cpp b/tools/assistant/tools/assistant/mainwindow.cpp index f9252485f1..123d43228b 100644 --- a/tools/assistant/tools/assistant/mainwindow.cpp +++ b/tools/assistant/tools/assistant/mainwindow.cpp @@ -398,9 +398,10 @@ void MainWindow::qtDocumentationInstalled() void MainWindow::checkInitState() { TRACE_OBJ - HelpEngineWrapper::instance().initialDocSetupDone(); - if (!m_cmdLine->enableRemoteControl()) + if (!m_cmdLine->enableRemoteControl()) { + HelpEngineWrapper::instance().initialDocSetupDone(); return; + } HelpEngineWrapper &helpEngine = HelpEngineWrapper::instance(); if (helpEngine.contentModel()->isCreatingContents() @@ -417,6 +418,7 @@ void MainWindow::checkInitState() disconnect(helpEngine.contentModel(), 0, this, 0); disconnect(helpEngine.indexModel(), 0, this, 0); } + HelpEngineWrapper::instance().initialDocSetupDone(); emit initDone(); } } -- cgit v1.2.1