diff options
author | Frederik Gladhorn <frederik.gladhorn@digia.com> | 2013-12-24 00:56:59 +0100 |
---|---|---|
committer | Frederik Gladhorn <frederik.gladhorn@digia.com> | 2013-12-24 00:56:59 +0100 |
commit | f0fbff4c905fd3e21d7aefedd45d98cc9dd54018 (patch) | |
tree | c61f47f858a9ac6183676bd7aee378a6a2b84a19 /src/corelib/thread | |
parent | d776937df91e46536f404c6868d64016b6038d7b (diff) | |
parent | 0e1ce36ae67de940b2d499ec7f23e520dce0f112 (diff) |
Merge remote-tracking branch 'origin/stable' into dev
Change-Id: I2defae1904154283446b069d151c3ef57302ec7b
Diffstat (limited to 'src/corelib/thread')
-rw-r--r-- | src/corelib/thread/qthread_win.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/corelib/thread/qthread_win.cpp b/src/corelib/thread/qthread_win.cpp index 903e72c151..28e13910d9 100644 --- a/src/corelib/thread/qthread_win.cpp +++ b/src/corelib/thread/qthread_win.cpp @@ -258,7 +258,11 @@ DWORD WINAPI qt_adopted_thread_watcher_function(LPVOID) qt_adopted_thread_watcher_mutex.unlock(); DWORD ret = WAIT_TIMEOUT; - int loops = (handlesCopy.count() / MAXIMUM_WAIT_OBJECTS) + 1, offset, count; + int count; + int offset; + int loops = handlesCopy.size() / MAXIMUM_WAIT_OBJECTS; + if (handlesCopy.size() % MAXIMUM_WAIT_OBJECTS) + ++loops; if (loops == 1) { // no need to loop, no timeout offset = 0; |