diff options
author | Olivier Goffart <olivier.goffart@nokia.com> | 2011-02-23 11:50:01 (GMT) |
---|---|---|
committer | Olivier Goffart <olivier.goffart@nokia.com> | 2011-02-23 11:50:01 (GMT) |
commit | 5a2f7b97d564e4b8a9619cd7aa1519b4dd084ae8 (patch) | |
tree | 7886477c9d38d8c07008e12abf2eb6e05ed672e3 /tests/auto/qtconcurrentiteratekernel | |
parent | ca7be48b7a150952a9657d1000941fb986e5bb2b (diff) | |
parent | 33f0f832a243ee2cb188fcf27126bde6c6c883b0 (diff) | |
download | Qt-5a2f7b97d564e4b8a9619cd7aa1519b4dd084ae8.zip Qt-5a2f7b97d564e4b8a9619cd7aa1519b4dd084ae8.tar.gz Qt-5a2f7b97d564e4b8a9619cd7aa1519b4dd084ae8.tar.bz2 |
Merge remote-tracking branch 'origin/4.7' into qt-master-from-4.7
Conflicts:
src/gui/kernel/qcocoaview_mac.mm
src/s60installs/bwins/QtGuiu.def
src/s60installs/eabi/QtGuiu.def
src/testlib/qtestcase.cpp
Diffstat (limited to 'tests/auto/qtconcurrentiteratekernel')
-rw-r--r-- | tests/auto/qtconcurrentiteratekernel/tst_qtconcurrentiteratekernel.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/auto/qtconcurrentiteratekernel/tst_qtconcurrentiteratekernel.cpp b/tests/auto/qtconcurrentiteratekernel/tst_qtconcurrentiteratekernel.cpp index a6499ff..92e8608 100644 --- a/tests/auto/qtconcurrentiteratekernel/tst_qtconcurrentiteratekernel.cpp +++ b/tests/auto/qtconcurrentiteratekernel/tst_qtconcurrentiteratekernel.cpp @@ -201,6 +201,7 @@ void tst_QtConcurrentIterateKernel::noIterations() startThreadEngine(new IterateKernel<TestIterator, void>(0, 0)).startBlocking(); } +QMutex threadsMutex; QSet<QThread *> threads; class ThrottleFor : public IterateKernel<TestIterator, void> { @@ -219,8 +220,10 @@ public: QThread *thread = QThread::currentThread(); - if (begin > 140 && end < 160) + if (begin > 140 && end < 160) { + QMutexLocker locker(&threadsMutex); threads.insert(thread); + } if (100 >= begin && 100 < end) { throttling = true; |