tools/assistant/lib/qhelpengine.cpp
branchGCC_SURGE
changeset 31 5daf16870df6
parent 30 5dc02b23752f
--- a/tools/assistant/lib/qhelpengine.cpp	Mon Jun 21 22:38:13 2010 +0100
+++ b/tools/assistant/lib/qhelpengine.cpp	Thu Jul 22 16:41:55 2010 +0100
@@ -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()