diff options
author | kh1 <qt-info@nokia.com> | 2010-03-15 13:04:14 +0100 |
---|---|---|
committer | kh1 <qt-info@nokia.com> | 2010-03-15 13:04:14 +0100 |
commit | 2ee0c797d9bb582073b53cb1f8348abaf2acc0db (patch) | |
tree | ceb02597eeba54ff5a06ccc13335462f3030c75a /tools/assistant/lib/qhelpengine.cpp | |
parent | ab0bd00d06356ded7c53e61421e3139571410c2c (diff) | |
download | qt4-tools-2ee0c797d9bb582073b53cb1f8348abaf2acc0db.tar.gz |
Fix broken setCollectionFile (creating multiple models instead reusing)
Reviewed-by: ck
Diffstat (limited to 'tools/assistant/lib/qhelpengine.cpp')
-rw-r--r-- | tools/assistant/lib/qhelpengine.cpp | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/tools/assistant/lib/qhelpengine.cpp b/tools/assistant/lib/qhelpengine.cpp index 96cf0fd24b..e8ae31b3dc 100644 --- a/tools/assistant/lib/qhelpengine.cpp +++ b/tools/assistant/lib/qhelpengine.cpp @@ -75,14 +75,15 @@ void QHelpEnginePrivate::init(const QString &collectionFile, { QHelpEngineCorePrivate::init(collectionFile, helpEngineCore); - contentModel = new QHelpContentModel(this); - indexModel = new QHelpIndexModel(this); - - connect(helpEngineCore, SIGNAL(setupFinished()), - this, SLOT(applyCurrentFilter())); - connect(helpEngineCore, SIGNAL(currentFilterChanged(QString)), - this, SLOT(applyCurrentFilter())); - + 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())); } void QHelpEnginePrivate::applyCurrentFilter() |