diff options
-rw-r--r-- | src/serialport/qserialport_p.h | 2 | ||||
-rw-r--r-- | src/serialport/qserialport_win.cpp | 9 | ||||
-rw-r--r-- | src/serialport/qserialport_wince.cpp | 9 |
3 files changed, 2 insertions, 18 deletions
diff --git a/src/serialport/qserialport_p.h b/src/serialport/qserialport_p.h index 4d37254..4a214e1 100644 --- a/src/serialport/qserialport_p.h +++ b/src/serialport/qserialport_p.h @@ -159,7 +159,9 @@ public: static QString portNameToSystemLocation(const QString &port); static QString portNameFromSystemLocation(const QString &location); +#if defined(Q_OS_UNIX) static qint32 settingFromBaudRate(qint32 baudRate); +#endif static QList<qint32> standardBaudRates(); diff --git a/src/serialport/qserialport_win.cpp b/src/serialport/qserialport_win.cpp index 8e7c278..6e1a44f 100644 --- a/src/serialport/qserialport_win.cpp +++ b/src/serialport/qserialport_win.cpp @@ -813,15 +813,6 @@ static const QList<qint32> standardBaudRatePairList() return standardBaudRatesTable; }; -qint32 QSerialPortPrivate::settingFromBaudRate(qint32 baudRate) -{ - const QList<qint32> baudRatePairList = standardBaudRatePairList(); - const QList<qint32>::const_iterator baudRatePairListConstIterator - = std::find(baudRatePairList.constBegin(), baudRatePairList.constEnd(), baudRate); - - return (baudRatePairListConstIterator != baudRatePairList.constEnd()) ? *baudRatePairListConstIterator : 0; -} - QList<qint32> QSerialPortPrivate::standardBaudRates() { return standardBaudRatePairList(); diff --git a/src/serialport/qserialport_wince.cpp b/src/serialport/qserialport_wince.cpp index b1975af..9221f0e 100644 --- a/src/serialport/qserialport_wince.cpp +++ b/src/serialport/qserialport_wince.cpp @@ -743,15 +743,6 @@ static const QList<qint32> standardBaudRatePairList() return standardBaudRatesTable; }; -qint32 QSerialPortPrivate::settingFromBaudRate(qint32 baudRate) -{ - const QList<qint32> baudRatePairList = standardBaudRatePairList(); - const QList<qint32>::const_iterator baudRatePairListConstIterator - = std::find(baudRatePairList.constBegin(), baudRatePairList.constEnd(), baudRate); - - return (baudRatePairListConstIterator != baudRatePairList.constEnd()) ? *baudRatePairListConstIterator : 0; -} - QList<qint32> QSerialPortPrivate::standardBaudRates() { return standardBaudRatePairList(); |