diff options
author | Alan Alpert <alan.alpert@nokia.com> | 2010-03-17 12:19:10 (GMT) |
---|---|---|
committer | Alan Alpert <alan.alpert@nokia.com> | 2010-03-17 12:19:10 (GMT) |
commit | 63520c42a85cc4b3d7e5da6f14b6e12774274fef (patch) | |
tree | 7229b0e3bdf624f3d07906027d40085075c1aec6 /tools/assistant | |
parent | 8a5cd17c49888e5b6cb230516e1722af9adba251 (diff) | |
parent | ed08d67fea713e550da0fd0542672cc4443806e2 (diff) | |
download | Qt-63520c42a85cc4b3d7e5da6f14b6e12774274fef.zip Qt-63520c42a85cc4b3d7e5da6f14b6e12774274fef.tar.gz Qt-63520c42a85cc4b3d7e5da6f14b6e12774274fef.tar.bz2 |
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt into 4.7
Conflicts:
configure.exe
src/declarative/util/qdeclarativelistmodel.cpp
tools/qml/qml.pro
Diffstat (limited to 'tools/assistant')
-rw-r--r-- | tools/assistant/lib/qhelpcontentwidget.cpp | 3 | ||||
-rw-r--r-- | tools/assistant/lib/qhelpengine.cpp | 17 | ||||
-rw-r--r-- | tools/assistant/lib/qhelpindexwidget.cpp | 3 | ||||
-rw-r--r-- | tools/assistant/tools/assistant/helpenginewrapper.cpp | 10 | ||||
-rw-r--r-- | tools/assistant/tools/assistant/mainwindow.cpp | 2 |
5 files changed, 16 insertions, 19 deletions
diff --git a/tools/assistant/lib/qhelpcontentwidget.cpp b/tools/assistant/lib/qhelpcontentwidget.cpp index a80dc39..6f3f942 100644 --- a/tools/assistant/lib/qhelpcontentwidget.cpp +++ b/tools/assistant/lib/qhelpcontentwidget.cpp @@ -370,7 +370,8 @@ void QHelpContentModel::invalidateContents(bool onShutDown) delete d->rootItem; d->rootItem = 0; } - reset(); + if (!onShutDown) + reset(); } /*! diff --git a/tools/assistant/lib/qhelpengine.cpp b/tools/assistant/lib/qhelpengine.cpp index 96cf0fd..e8ae31b 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() diff --git a/tools/assistant/lib/qhelpindexwidget.cpp b/tools/assistant/lib/qhelpindexwidget.cpp index 270bcdd..11b9966 100644 --- a/tools/assistant/lib/qhelpindexwidget.cpp +++ b/tools/assistant/lib/qhelpindexwidget.cpp @@ -244,7 +244,8 @@ void QHelpIndexModel::invalidateIndex(bool onShutDown) disconnect(this, SLOT(insertIndices())); d->indexProvider->stopCollecting(); d->indices.clear(); - filter(QString()); + if (!onShutDown) + filter(QString()); } /*! diff --git a/tools/assistant/tools/assistant/helpenginewrapper.cpp b/tools/assistant/tools/assistant/helpenginewrapper.cpp index 41ad633..9748702 100644 --- a/tools/assistant/tools/assistant/helpenginewrapper.cpp +++ b/tools/assistant/tools/assistant/helpenginewrapper.cpp @@ -112,7 +112,6 @@ private: QFileSystemWatcher * const m_qchWatcher; typedef QPair<QDateTime, QSharedPointer<TimeoutForwarder> > RecentSignal; QMap<QString, RecentSignal> m_recentQchUpdates; - bool m_initialReindexingNeeded; }; const QString HelpEngineWrapper::TrUnfiltered = tr("Unfiltered"); @@ -182,8 +181,7 @@ void HelpEngineWrapper::initialDocSetupDone() TRACE_OBJ connect(d->m_helpEngine, SIGNAL(setupFinished()), searchEngine(), SLOT(indexDocumentation())); - if (d->m_initialReindexingNeeded) - setupData(); + setupData(); } QHelpSearchEngine *HelpEngineWrapper::searchEngine() const @@ -236,7 +234,6 @@ bool HelpEngineWrapper::registerDocumentation(const QString &docFile) return false; d->m_qchWatcher->addPath(docFile); d->checkDocFilesWatched(); - d->m_initialReindexingNeeded = true; return true; } @@ -249,7 +246,6 @@ bool HelpEngineWrapper::unregisterDocumentation(const QString &namespaceName) return false; d->m_qchWatcher->removePath(file); d->checkDocFilesWatched(); - d->m_initialReindexingNeeded = true; return true; } @@ -729,8 +725,7 @@ void TimeoutForwarder::forward() HelpEngineWrapperPrivate::HelpEngineWrapperPrivate(const QString &collectionFile) : m_helpEngine(new QHelpEngine(collectionFile, this)), - m_qchWatcher(new QFileSystemWatcher(this)), - m_initialReindexingNeeded(false) + m_qchWatcher(new QFileSystemWatcher(this)) { TRACE_OBJ if (!m_helpEngine->customFilters().contains(Unfiltered)) @@ -829,7 +824,6 @@ void HelpEngineWrapperPrivate::qchFileChanged(const QString &fileName, } else { emit documentationUpdated(ns); } - m_initialReindexingNeeded = true; m_helpEngine->setupData(); } m_recentQchUpdates.erase(it); diff --git a/tools/assistant/tools/assistant/mainwindow.cpp b/tools/assistant/tools/assistant/mainwindow.cpp index 687e6bc..c403aa7 100644 --- a/tools/assistant/tools/assistant/mainwindow.cpp +++ b/tools/assistant/tools/assistant/mainwindow.cpp @@ -361,6 +361,7 @@ void MainWindow::qtDocumentationInstalled() void MainWindow::checkInitState() { TRACE_OBJ + HelpEngineWrapper::instance().initialDocSetupDone(); if (!m_cmdLine->enableRemoteControl()) return; @@ -381,7 +382,6 @@ void MainWindow::checkInitState() } emit initDone(); } - HelpEngineWrapper::instance().initialDocSetupDone(); } void MainWindow::insertLastPages() |