diff options
author | Joerg Bornemann <joerg.bornemann@digia.com> | 2014-01-08 12:06:28 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-01-13 20:45:10 +0100 |
commit | d19eef3bbb330d74caade0da32e85034c3e5c69e (patch) | |
tree | ce1001384ed6b78eddb4438fd518a79b524e890e /src/corelib/io/qwinoverlappedionotifier_p.h | |
parent | adcab02d964a54777a6126f78bfe4abf7b2578cb (diff) |
d-pointerize QWinOverlappedIoNotifier
Preparation for removing the qt_windows.h include from
qwinoverlappedionotifier_p.h.
Change-Id: I27ab3891962327ab5db75fbfcc3cf57c50a0d1c4
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Laszlo Papp <lpapp@kde.org>
Diffstat (limited to 'src/corelib/io/qwinoverlappedionotifier_p.h')
-rw-r--r-- | src/corelib/io/qwinoverlappedionotifier_p.h | 40 |
1 files changed, 8 insertions, 32 deletions
diff --git a/src/corelib/io/qwinoverlappedionotifier_p.h b/src/corelib/io/qwinoverlappedionotifier_p.h index 451bedf7cf..545d7bba84 100644 --- a/src/corelib/io/qwinoverlappedionotifier_p.h +++ b/src/corelib/io/qwinoverlappedionotifier_p.h @@ -55,57 +55,33 @@ #include <qobject.h> #include <qt_windows.h> -#include <qqueue.h> QT_BEGIN_NAMESPACE -class QWinIoCompletionPort; +class QWinOverlappedIoNotifierPrivate; class Q_CORE_EXPORT QWinOverlappedIoNotifier : public QObject { Q_OBJECT + Q_DISABLE_COPY(QWinOverlappedIoNotifier) + Q_DECLARE_PRIVATE(QWinOverlappedIoNotifier) + Q_PRIVATE_SLOT(d_func(), OVERLAPPED *_q_notified()) + friend class QWinIoCompletionPort; public: QWinOverlappedIoNotifier(QObject *parent = 0); ~QWinOverlappedIoNotifier(); void setHandle(HANDLE h); - HANDLE handle() const { return hHandle; } + HANDLE handle() const; void setEnabled(bool enabled); bool waitForNotified(int msecs, OVERLAPPED *overlapped); Q_SIGNALS: void notified(DWORD numberOfBytes, DWORD errorCode, OVERLAPPED *overlapped); +#if !defined(Q_QDOC) void _q_notify(); - -private Q_SLOTS: - OVERLAPPED *_q_notified(); - -private: - void notify(DWORD numberOfBytes, DWORD errorCode, OVERLAPPED *overlapped); - -private: - static QWinIoCompletionPort *iocp; - static HANDLE iocpInstanceLock; - static unsigned int iocpInstanceRefCount; - HANDLE hHandle; - HANDLE hSemaphore; - HANDLE hResultsMutex; - - struct IOResult - { - IOResult(DWORD n = 0, DWORD e = 0, OVERLAPPED *p = 0) - : numberOfBytes(n), errorCode(e), overlapped(p) - {} - - DWORD numberOfBytes; - DWORD errorCode; - OVERLAPPED *overlapped; - }; - - QQueue<IOResult> results; - - friend class QWinIoCompletionPort; +#endif }; QT_END_NAMESPACE |