diff options
author | Joerg Bornemann <joerg.bornemann@theqtcompany.com> | 2015-06-10 16:45:02 +0200 |
---|---|---|
committer | Joerg Bornemann <joerg.bornemann@theqtcompany.com> | 2016-03-15 20:15:11 +0000 |
commit | 5393ba970b0d25280a048ef31c3ffd2e5efe0320 (patch) | |
tree | 9a26ff495d8db2d65e5c2217b9c49f819d288d2c /src/corelib | |
parent | 6c53f2528c86fb72f19951a799f0afaa02ad4490 (diff) |
Remove handle duplication code from QWindowsPipeWriter
There is no apparent reason why the handle should be duplicated.
Change-Id: I8ff2cde2f050934ed0dd9ab2d39a1b1efa327a17
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Diffstat (limited to 'src/corelib')
-rw-r--r-- | src/corelib/io/qwindowspipewriter.cpp | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/corelib/io/qwindowspipewriter.cpp b/src/corelib/io/qwindowspipewriter.cpp index 21df5d0643..5b11ba6112 100644 --- a/src/corelib/io/qwindowspipewriter.cpp +++ b/src/corelib/io/qwindowspipewriter.cpp @@ -39,12 +39,10 @@ QT_BEGIN_NAMESPACE QWindowsPipeWriter::QWindowsPipeWriter(HANDLE pipe, QObject * parent) : QThread(parent), - writePipe(INVALID_HANDLE_VALUE), + writePipe(pipe), quitNow(false), hasWritten(false) { - DuplicateHandle(GetCurrentProcess(), pipe, GetCurrentProcess(), - &writePipe, 0, FALSE, DUPLICATE_SAME_ACCESS); } QWindowsPipeWriter::~QWindowsPipeWriter() @@ -55,7 +53,6 @@ QWindowsPipeWriter::~QWindowsPipeWriter() lock.unlock(); if (!wait(30000)) terminate(); - CloseHandle(writePipe); } bool QWindowsPipeWriter::waitForWrite(int msecs) |