diff options
author | Denis Shienkov <denis.shienkov@gmail.com> | 2014-11-24 18:21:57 +0300 |
---|---|---|
committer | Denis Shienkov <denis.shienkov@gmail.com> | 2014-11-27 11:19:43 +0100 |
commit | ab51ad6a5f4e533c31bd8e5b6f16a3bcd09a3ee6 (patch) | |
tree | 783f2a4cccc2fcc420bef5557bf8b47aa10049d6 /src/serialport/qserialportinfo_p.h | |
parent | a00cbfb7f336a56b9ae2235c44149ec63ced9ee5 (diff) |
Allow to use custom devices paths
QSP incorrectly transforms non-standard device names to their paths
and vice-versa (for example, "/home/ttyS0", "//./COM1", and so on).
Now this problem is solved:
* The transformation code is moved to QSPP.
* Added autotests auto/qserialportinfoprivate to testing of
conversion algorithm. These tests are private and can be activated
with building of QtSerialPort with:
qmake "QT_CONFIG+=private_tests warnings_are_errors" \
DEFINES+=QT_BUILD_INTERNAL
Tested on Windows 8, Linux, OSX with auto-tests, with on-board
and virtual serial ports.
Task-number: QTBUG-38639
Change-Id: I43757a7f1390f53ed2b1d70de59c6bfb71892a59
Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com>
Diffstat (limited to 'src/serialport/qserialportinfo_p.h')
-rw-r--r-- | src/serialport/qserialportinfo_p.h | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/serialport/qserialportinfo_p.h b/src/serialport/qserialportinfo_p.h index 6ab41170..c9f10863 100644 --- a/src/serialport/qserialportinfo_p.h +++ b/src/serialport/qserialportinfo_p.h @@ -51,7 +51,7 @@ QT_BEGIN_NAMESPACE -class QSerialPortInfoPrivate +class Q_AUTOTEST_EXPORT QSerialPortInfoPrivate { public: QSerialPortInfoPrivate() @@ -59,9 +59,15 @@ public: , productIdentifier(0) , hasVendorIdentifier(false) , hasProductIdentifier(false) - {} + { + } + + ~QSerialPortInfoPrivate() + { + } - ~QSerialPortInfoPrivate() {} + static QString portNameToSystemLocation(const QString &source); + static QString portNameFromSystemLocation(const QString &source); QString portName; QString device; |