diff options
author | Andre Hartmann <aha_1980@gmx.de> | 2017-09-04 22:28:44 +0200 |
---|---|---|
committer | André Hartmann <aha_1980@gmx.de> | 2017-09-05 07:00:18 +0000 |
commit | 9a720b4fcc1d743db1b04f7696a30e7850c7707b (patch) | |
tree | e39ef68ec9e34cf1d254183636f2e089d235c002 | |
parent | dc7c6943b8c2890bb3d4d8ca6f526d2d45075a45 (diff) |
QCanBusDevice: Improve connect/disconnect documentation
... because I recently saw the following statement in user code:
if (!m_device->connectDevice())
m_device->disconnectDevice();
Change-Id: Ifabd5e7416f5cc58d39c197abad3fc53d54e6ccc
Reviewed-by: Rolf Eike Beer <eb@emlix.com>
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
-rw-r--r-- | src/serialbus/qcanbusdevice.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/serialbus/qcanbusdevice.cpp b/src/serialbus/qcanbusdevice.cpp index f613f0a..919c38a 100644 --- a/src/serialbus/qcanbusdevice.cpp +++ b/src/serialbus/qcanbusdevice.cpp @@ -631,6 +631,8 @@ QCanBusFrame QCanBusDevice::readFrame() otherwise \c false. This function calls \l open() as part of its implementation. + + \sa disconnectDevice() */ bool QCanBusDevice::connectDevice() { @@ -658,6 +660,11 @@ bool QCanBusDevice::connectDevice() Disconnects the device from the CAN bus. This function calls \l close() as part of its implementation. + + \note This function should only be called, if connectDevice() + returned \c true. + + \sa connectDevice() */ void QCanBusDevice::disconnectDevice() { |