diff options
author | Denis Shienkov <denis.shienkov@gmail.com> | 2016-02-16 12:54:08 +0300 |
---|---|---|
committer | Denis Shienkov <denis.shienkov@gmail.com> | 2016-02-16 15:22:15 +0000 |
commit | 03bff71737ab2732561586e966ab3966a42468d1 (patch) | |
tree | 6e52221f0cbe2c73c1da435f962ab3c53683946e /src/serialport | |
parent | 26ea44e3b45de4a33515c826f6f5c9aa501f57fd (diff) | |
download | qtserialport-03bff71737ab2732561586e966ab3966a42468d1.tar.gz |
Move QSPI::standardBaudRates() in one place
Currently we do not need in multiple implementations of
this method, and can move it to the qserialportinfo.cpp
file.
Change-Id: I9d27c739ebd07f76a0e4e808766052bf90d4c19b
Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com>
Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
Diffstat (limited to 'src/serialport')
-rw-r--r-- | src/serialport/qserialportinfo.cpp | 5 | ||||
-rw-r--r-- | src/serialport/qserialportinfo_freebsd.cpp | 5 | ||||
-rw-r--r-- | src/serialport/qserialportinfo_osx.cpp | 5 | ||||
-rw-r--r-- | src/serialport/qserialportinfo_unix.cpp | 5 | ||||
-rw-r--r-- | src/serialport/qserialportinfo_win.cpp | 5 | ||||
-rw-r--r-- | src/serialport/qserialportinfo_wince.cpp | 5 |
6 files changed, 5 insertions, 25 deletions
diff --git a/src/serialport/qserialportinfo.cpp b/src/serialport/qserialportinfo.cpp index 3e7245e..ebeb6a0 100644 --- a/src/serialport/qserialportinfo.cpp +++ b/src/serialport/qserialportinfo.cpp @@ -36,6 +36,7 @@ #include "qserialportinfo.h" #include "qserialportinfo_p.h" #include "qserialport.h" +#include "qserialport_p.h" QT_BEGIN_NAMESPACE @@ -284,6 +285,10 @@ bool QSerialPortInfo::hasProductIdentifier() const Returns a list of available standard baud rates supported by the current serial port. */ +QList<qint32> QSerialPortInfo::standardBaudRates() +{ + return QSerialPortPrivate::standardBaudRates(); +} /*! \fn QList<QSerialPortInfo> QSerialPortInfo::availablePorts() diff --git a/src/serialport/qserialportinfo_freebsd.cpp b/src/serialport/qserialportinfo_freebsd.cpp index 49612f1..552db89 100644 --- a/src/serialport/qserialportinfo_freebsd.cpp +++ b/src/serialport/qserialportinfo_freebsd.cpp @@ -330,11 +330,6 @@ QList<QSerialPortInfo> QSerialPortInfo::availablePorts() return serialPortInfoList; } -QList<qint32> QSerialPortInfo::standardBaudRates() -{ - return QSerialPortPrivate::standardBaudRates(); -} - bool QSerialPortInfo::isBusy() const { QString lockFilePath = serialPortLockFilePath(portName()); diff --git a/src/serialport/qserialportinfo_osx.cpp b/src/serialport/qserialportinfo_osx.cpp index 5a0cdd8..be9897e 100644 --- a/src/serialport/qserialportinfo_osx.cpp +++ b/src/serialport/qserialportinfo_osx.cpp @@ -224,11 +224,6 @@ QList<QSerialPortInfo> QSerialPortInfo::availablePorts() return serialPortInfoList; } -QList<qint32> QSerialPortInfo::standardBaudRates() -{ - return QSerialPortPrivate::standardBaudRates(); -} - bool QSerialPortInfo::isBusy() const { QString lockFilePath = serialPortLockFilePath(portName()); diff --git a/src/serialport/qserialportinfo_unix.cpp b/src/serialport/qserialportinfo_unix.cpp index 2a66635..fe97476 100644 --- a/src/serialport/qserialportinfo_unix.cpp +++ b/src/serialport/qserialportinfo_unix.cpp @@ -459,11 +459,6 @@ QList<QSerialPortInfo> QSerialPortInfo::availablePorts() return serialPortInfoList; } -QList<qint32> QSerialPortInfo::standardBaudRates() -{ - return QSerialPortPrivate::standardBaudRates(); -} - bool QSerialPortInfo::isBusy() const { QString lockFilePath = serialPortLockFilePath(portName()); diff --git a/src/serialport/qserialportinfo_win.cpp b/src/serialport/qserialportinfo_win.cpp index 63cf642..140f191 100644 --- a/src/serialport/qserialportinfo_win.cpp +++ b/src/serialport/qserialportinfo_win.cpp @@ -345,11 +345,6 @@ QList<QSerialPortInfo> QSerialPortInfo::availablePorts() return serialPortInfoList; } -QList<qint32> QSerialPortInfo::standardBaudRates() -{ - return QSerialPortPrivate::standardBaudRates(); -} - bool QSerialPortInfo::isBusy() const { const HANDLE handle = ::CreateFile(reinterpret_cast<const wchar_t*>(systemLocation().utf16()), diff --git a/src/serialport/qserialportinfo_wince.cpp b/src/serialport/qserialportinfo_wince.cpp index 3688bc3..7c60bee 100644 --- a/src/serialport/qserialportinfo_wince.cpp +++ b/src/serialport/qserialportinfo_wince.cpp @@ -120,11 +120,6 @@ QList<QSerialPortInfo> QSerialPortInfo::availablePorts() return serialPortInfoList; } -QList<qint32> QSerialPortInfo::standardBaudRates() -{ - return QSerialPortPrivate::standardBaudRates(); -} - bool QSerialPortInfo::isBusy() const { const HANDLE handle = ::CreateFile(reinterpret_cast<const wchar_t*>(systemLocation().utf16()), |