summaryrefslogtreecommitdiffstats
path: root/tools/assistant
diff options
context:
space:
mode:
authorck <qt-info@nokia.com>2010-02-10 16:11:23 (GMT)
committerck <qt-info@nokia.com>2010-02-10 16:12:22 (GMT)
commite396749026f1a22f905540befa9e2ed8ba8b46b9 (patch)
tree3d5de422787532e3928afb39869c3d695df1034b /tools/assistant
parentd7c2a9065f05845a7378e77ddc41b63b8dff6d1c (diff)
downloadQt-e396749026f1a22f905540befa9e2ed8ba8b46b9.zip
Qt-e396749026f1a22f905540befa9e2ed8ba8b46b9.tar.gz
Qt-e396749026f1a22f905540befa9e2ed8ba8b46b9.tar.bz2
Assistant: Remove assertion for all files being watched.
For unknown reasons, the assumption does not hold at times.
Diffstat (limited to 'tools/assistant')
-rw-r--r--tools/assistant/tools/assistant/helpenginewrapper.cpp22
1 files changed, 13 insertions, 9 deletions
diff --git a/tools/assistant/tools/assistant/helpenginewrapper.cpp b/tools/assistant/tools/assistant/helpenginewrapper.cpp
index ddc056a..76211c5 100644
--- a/tools/assistant/tools/assistant/helpenginewrapper.cpp
+++ b/tools/assistant/tools/assistant/helpenginewrapper.cpp
@@ -103,7 +103,7 @@ private:
HelpEngineWrapperPrivate(const QString &collectionFile);
void initFileSystemWatchers();
- void assertDocFilesWatched();
+ void checkDocFilesWatched();
void qchFileChanged(const QString &fileName, bool fromTimeout);
static const int UpdateGracePeriod = 2000;
@@ -202,23 +202,23 @@ const QString HelpEngineWrapper::collectionFile() const
bool HelpEngineWrapper::registerDocumentation(const QString &docFile)
{
TRACE_OBJ
- d->assertDocFilesWatched();
+ d->checkDocFilesWatched();
if (!d->m_helpEngine->registerDocumentation(docFile))
return false;
d->m_qchWatcher->addPath(docFile);
- d->assertDocFilesWatched();
+ d->checkDocFilesWatched();
return true;
}
bool HelpEngineWrapper::unregisterDocumentation(const QString &namespaceName)
{
TRACE_OBJ
- d->assertDocFilesWatched();
+ d->checkDocFilesWatched();
const QString &file = d->m_helpEngine->documentationFileName(namespaceName);
if (!d->m_helpEngine->unregisterDocumentation(namespaceName))
return false;
d->m_qchWatcher->removePath(file);
- d->assertDocFilesWatched();
+ d->checkDocFilesWatched();
return true;
}
@@ -715,7 +715,7 @@ void HelpEngineWrapperPrivate::initFileSystemWatchers()
connect(m_qchWatcher, SIGNAL(fileChanged(QString)),
this, SLOT(qchFileChanged(QString)));
}
- assertDocFilesWatched();
+ checkDocFilesWatched();
}
void HelpEngineWrapperPrivate::qchFileChanged(const QString &fileName)
@@ -724,11 +724,15 @@ void HelpEngineWrapperPrivate::qchFileChanged(const QString &fileName)
qchFileChanged(fileName, false);
}
-void HelpEngineWrapperPrivate::assertDocFilesWatched()
+void HelpEngineWrapperPrivate::checkDocFilesWatched()
{
TRACE_OBJ
- Q_ASSERT(m_qchWatcher->files().count()
- == m_helpEngine->registeredDocumentations().count());
+ const int watchedFilesCount = m_qchWatcher->files().count();
+ const int docFilesCount = m_helpEngine->registeredDocumentations().count();
+ if (watchedFilesCount != docFilesCount) {
+ qWarning("Strange: Have %d docs, but %d are being watched",
+ watchedFilesCount, docFilesCount);
+ }
}
void HelpEngineWrapperPrivate::qchFileChanged(const QString &fileName,