From d55407822eefbc05f7d8bb44c53b057332b5b399 Mon Sep 17 00:00:00 2001 From: Alexander Volkov Date: Fri, 19 Sep 2014 13:52:42 +0400 Subject: [PATCH] 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 Change-Id: I16cae03f08bbc9a19ec9298c84c602a4046dce93 Reviewed-by: Shawn Rutledge Reviewed-by: Karsten Heimrich --- src/assistant/assistant/mainwindow.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/assistant/assistant/mainwindow.cpp b/src/assistant/assistant/mainwindow.cpp index 3a3c0e8..491929e 100644 --- a/src/assistant/assistant/mainwindow.cpp +++ b/src/assistant/assistant/mainwindow.cpp @@ -484,9 +484,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() @@ -503,6 +504,7 @@ void MainWindow::checkInitState() disconnect(helpEngine.contentModel(), 0, this, 0); disconnect(helpEngine.indexModel(), 0, this, 0); } + HelpEngineWrapper::instance().initialDocSetupDone(); emit initDone(); } } -- 2.7.4