diff options
author | Laszlo Papp <lpapp@kde.org> | 2013-02-21 22:38:48 +0000 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-02-22 09:22:13 +0100 |
commit | f01e124dd0e4b9c8105c1138bcb3411e2147ed86 (patch) | |
tree | 93803f1d53c9e33f65fc92c7a918a2cda3d61999 /src | |
parent | c2b4ac44054de841ba66a7b8a5ea03d8223657e5 (diff) | |
download | qtserialport-f01e124dd0e4b9c8105c1138bcb3411e2147ed86.tar.gz |
Remove the device is not opened error handling
1) DeviceIsNotOpenedError is wrong because it should be DeviceNotOpenedError to
be shorter without losing any part of the meaning.
2) QFileDevice does not have such a signal, so it is inconsistent and risky to
add on our own.
3) QFileDevice does not set any error either when trying to close a non opened
device.
4) I also think that, it is the correct operation because it is not an error
after all.
Change-Id: I6294754bf9f038d1e294b8f3b8aa2e1d53d81681
Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com>
Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/serialport/qserialport.cpp | 3 | ||||
-rw-r--r-- | src/serialport/qserialport.h | 1 |
2 files changed, 0 insertions, 4 deletions
diff --git a/src/serialport/qserialport.cpp b/src/serialport/qserialport.cpp index 1ef6fc7..cc53d51 100644 --- a/src/serialport/qserialport.cpp +++ b/src/serialport/qserialport.cpp @@ -363,8 +363,6 @@ int QSerialPortPrivateData::timeoutValue(int msecs, int elapsed) having enough permission and credentials to open. \value OpenError An error occurred while attempting to open an already opened device in this object. - \value DeviceIsNotOpenedError An error occurred while attempting to - control a device still closed. \value ParityError Parity error detected by the hardware while reading data. \value FramingError Framing error detected by the hardware while reading data. \value BreakConditionError Break condition detected by the hardware on @@ -545,7 +543,6 @@ void QSerialPort::close() { Q_D(QSerialPort); if (!isOpen()) { - setError(QSerialPort::DeviceIsNotOpenedError); return; } diff --git a/src/serialport/qserialport.h b/src/serialport/qserialport.h index 3e6b221..88a04db 100644 --- a/src/serialport/qserialport.h +++ b/src/serialport/qserialport.h @@ -149,7 +149,6 @@ public: DeviceNotFoundError, PermissionError, OpenError, - DeviceIsNotOpenedError, ParityError, FramingError, BreakConditionError, |