tools/assistant/lib/qhelpengine.cpp
changeset 30 5dc02b23752f
parent 18 2f34d5167611
--- a/tools/assistant/lib/qhelpengine.cpp	Wed Jun 23 19:07:03 2010 +0300
+++ b/tools/assistant/lib/qhelpengine.cpp	Tue Jul 06 15:10:48 2010 +0300
@@ -75,14 +75,15 @@
 {
     QHelpEngineCorePrivate::init(collectionFile, helpEngineCore);
 
-    contentModel = new QHelpContentModel(this);
-    indexModel = new QHelpIndexModel(this);
+    if (!contentModel)
+        contentModel = new QHelpContentModel(this);
+    if (!indexModel)
+        indexModel = new QHelpIndexModel(this);
 
-    connect(helpEngineCore, SIGNAL(setupFinished()),
-        this, SLOT(applyCurrentFilter()));
-    connect(helpEngineCore, SIGNAL(currentFilterChanged(QString)),
-        this, SLOT(applyCurrentFilter()));
-
+    connect(helpEngineCore, SIGNAL(setupFinished()), this,
+        SLOT(applyCurrentFilter()));
+    connect(helpEngineCore, SIGNAL(currentFilterChanged(QString)), this,
+        SLOT(applyCurrentFilter()));
 }
 
 void QHelpEnginePrivate::applyCurrentFilter()