summaryrefslogtreecommitdiff
path: root/src/serialport/qserialport_p.h
diff options
context:
space:
mode:
authorDenis Shienkov <denis.shienkov@gmail.com>2014-11-15 19:14:01 +0300
committerDenis Shienkov <denis.shienkov@gmail.com>2014-11-15 18:01:48 +0100
commit22b4e280a16d47b5f46706cf80d976259e519007 (patch)
tree93590b25744418fbb062e99f77a351e974e9fb3a /src/serialport/qserialport_p.h
parent3e5a8a6437321151c24c84ed5e671398a157809e (diff)
downloadqtserialport-22b4e280a16d47b5f46706cf80d976259e519007.tar.gz
Create notifiers inside of startAsyncXX() methods when required
It is reasonable to move creation of notifiers from the constructor to the specific separate methods. In this case notifiers are created in startAsyncXXX() methods if necessary for concrete I/O operation. Also it allows to return an error in case a notifier is failed. Tested on Windows 8 with virtual com0com serial ports. Change-Id: I351a4c54214c84455150d0fc157a99108280cc12 Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
Diffstat (limited to 'src/serialport/qserialport_p.h')
-rw-r--r--src/serialport/qserialport_p.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/serialport/qserialport_p.h b/src/serialport/qserialport_p.h
index e39ba2b..f0d6fff 100644
--- a/src/serialport/qserialport_p.h
+++ b/src/serialport/qserialport_p.h
@@ -55,7 +55,6 @@
# include <QtCore/qmutex.h>
# include <qt_windows.h>
#elif defined (Q_OS_WIN32)
-# include <QtCore/qwineventnotifier.h>
# include <qt_windows.h>
#elif defined (Q_OS_UNIX)
# include <QtCore/qlockfile.h>
@@ -204,7 +203,7 @@ public:
#elif defined (Q_OS_WIN32)
- bool initialize(QIODevice::OpenMode mode);
+ bool initialize();
bool updateDcb();
bool updateCommTimeouts();
qint64 handleOverlappedResult(int direction, OVERLAPPED &overlapped);
@@ -222,6 +221,10 @@ public:
bool emulateErrorPolicy();
void emitReadyRead();
+ bool setCommunicationNotificationEnabled(bool enable);
+ bool setReadNotificationEnabled(bool enable);
+ bool setWriteNotificationEnabled(bool enable);
+
DCB currentDcb;
DCB restoredDcb;
COMMTIMEOUTS currentCommTimeouts;