summaryrefslogtreecommitdiffstats
path: root/src/corelib/io/qprocess_win.cpp
diff options
context:
space:
mode:
authorOliver Wolff <oliver.wolff@theqtcompany.com>2015-06-10 12:44:43 +0200
committerOliver Wolff <oliver.wolff@theqtcompany.com>2015-06-16 06:40:27 +0000
commit1de6fd49d16d34d54d2813c30d2fef831b8d5c63 (patch)
tree648b4cb3bf7972a65905a17589b12ed5606a3b2c /src/corelib/io/qprocess_win.cpp
parentd3ad8cff175bd806da126a575025e209277e1514 (diff)
Use "Ex"-versions of WaitForSingle/MultipleObject(s) where possible
Not only should using the "Ex"-versions be the rule and not the exception on Windows, but it's only the only way to share as much code as possible between Desktop Windows and WinRT (which is pushed by Microsoft a lot). The current rule of Desktop and WinCE vs WinRT does not make a lot of sense any longer, as WinCE is getting less and less important. By moving these #ifdefs in favor of WinRT, WinCe code might be removed easier in the future. Change-Id: I0ef94fb14fbf8add9c2dfa2a3fb8036d25fb697d Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/io/qprocess_win.cpp')
-rw-r--r--src/corelib/io/qprocess_win.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/corelib/io/qprocess_win.cpp b/src/corelib/io/qprocess_win.cpp
index cef961ecbd..8bbca20365 100644
--- a/src/corelib/io/qprocess_win.cpp
+++ b/src/corelib/io/qprocess_win.cpp
@@ -652,7 +652,7 @@ bool QProcessPrivate::waitForReadyRead(int msecs)
if (!pid)
return false;
- if (WaitForSingleObject(pid->hProcess, 0) == WAIT_OBJECT_0) {
+ if (WaitForSingleObjectEx(pid->hProcess, 0, false) == WAIT_OBJECT_0) {
bool readyReadEmitted = drainOutputPipes();
_q_processDied();
return readyReadEmitted;
@@ -721,7 +721,7 @@ bool QProcessPrivate::waitForBytesWritten(int msecs)
// Wait for the process to signal any change in its state,
// such as incoming data, or if the process died.
- if (WaitForSingleObject(pid->hProcess, 0) == WAIT_OBJECT_0) {
+ if (WaitForSingleObjectEx(pid->hProcess, 0, false) == WAIT_OBJECT_0) {
_q_processDied();
return false;
}