summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorck <qt-info@nokia.com>2009-12-08 11:03:47 (GMT)
committerck <qt-info@nokia.com>2009-12-08 11:03:47 (GMT)
commitadef8ffa48c908dda1e2f048469c1e08eec088e3 (patch)
tree1efad088d41cf0820de569d56d6605849424398d /tools
parentf4f28a0d32758476a3f5733054a50b9b36392288 (diff)
downloadQt-adef8ffa48c908dda1e2f048469c1e08eec088e3.zip
Qt-adef8ffa48c908dda1e2f048469c1e08eec088e3.tar.gz
Qt-adef8ffa48c908dda1e2f048469c1e08eec088e3.tar.bz2
Assistant: Fix race condition in index creation.
Reviewed-by: kh1
Diffstat (limited to 'tools')
-rw-r--r--tools/assistant/lib/qhelpindexwidget.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/tools/assistant/lib/qhelpindexwidget.cpp b/tools/assistant/lib/qhelpindexwidget.cpp
index 475a1fe..6cf1a72 100644
--- a/tools/assistant/lib/qhelpindexwidget.cpp
+++ b/tools/assistant/lib/qhelpindexwidget.cpp
@@ -130,6 +130,7 @@ void QHelpIndexProvider::stopCollecting()
m_abort = true;
m_mutex.unlock();
wait();
+ m_abort = false;
}
QStringList QHelpIndexProvider::indices() const
@@ -164,7 +165,6 @@ void QHelpIndexProvider::run()
foreach (QString dbFileName, m_helpEngine->fileNameReaderMap.keys()) {
m_mutex.lock();
if (m_abort) {
- m_abort = false;
m_mutex.unlock();
return;
}
@@ -181,7 +181,6 @@ void QHelpIndexProvider::run()
foreach (QString s, lst)
indicesSet.insert(s);
if (m_abort) {
- m_abort = false;
m_mutex.unlock();
return;
}
@@ -194,7 +193,6 @@ void QHelpIndexProvider::run()
m_mutex.lock();
m_indices = indicesSet.values();
qSort(m_indices.begin(), m_indices.end(), caseInsensitiveLessThan);
- m_abort = false;
m_mutex.unlock();
}