diff options
author | Denis Shienkov <denis.shienkov@gmail.com> | 2014-11-21 16:01:30 +0300 |
---|---|---|
committer | Denis Shienkov <denis.shienkov@gmail.com> | 2014-11-21 19:00:34 +0100 |
commit | 7f8d17b6fe903e0603c8e8fea9bdd7eb7fe66f34 (patch) | |
tree | de3dc43e38507ae3a163f082627425a38d54a68e /src/serialport/qserialportinfo.cpp | |
parent | 7a6da7878566dc18acb540bd29f7e11fa7e3ff66 (diff) | |
download | qtserialport-7f8d17b6fe903e0603c8e8fea9bdd7eb7fe66f34.tar.gz |
Fix QSPI::isNull()
The method QSPI::isNull() should return false when QSPI is empty.
Tested on Winsows 8 and Linux with on-board, virtual and USB serial
ports using Qt5 and then Qt4.
Task-number: QTBUG-41262
Change-Id: Ic9e0afc5549311283aef7ec2ed841f5e418b7edf
Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com>
Diffstat (limited to 'src/serialport/qserialportinfo.cpp')
-rw-r--r-- | src/serialport/qserialportinfo.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/serialport/qserialportinfo.cpp b/src/serialport/qserialportinfo.cpp index 23a4d1c..ced4361 100644 --- a/src/serialport/qserialportinfo.cpp +++ b/src/serialport/qserialportinfo.cpp @@ -65,7 +65,6 @@ QT_BEGIN_NAMESPACE \sa isNull() */ QSerialPortInfo::QSerialPortInfo() - : d_ptr(new QSerialPortInfoPrivate) { } @@ -81,7 +80,6 @@ QSerialPortInfo::QSerialPortInfo(const QSerialPortInfo &other) Constructs a QSerialPortInfo object from serial \a port. */ QSerialPortInfo::QSerialPortInfo(const QSerialPort &port) - : d_ptr(new QSerialPortInfoPrivate) { foreach (const QSerialPortInfo &serialPortInfo, availablePorts()) { if (port.portName() == serialPortInfo.portName()) { @@ -99,7 +97,6 @@ QSerialPortInfo::QSerialPortInfo(const QSerialPort &port) instance for that port. */ QSerialPortInfo::QSerialPortInfo(const QString &name) - : d_ptr(new QSerialPortInfoPrivate) { foreach (const QSerialPortInfo &serialPortInfo, availablePorts()) { if (name == serialPortInfo.portName()) { @@ -109,6 +106,11 @@ QSerialPortInfo::QSerialPortInfo(const QString &name) } } +QSerialPortInfo::QSerialPortInfo(const QSerialPortInfoPrivate &dd) + : d_ptr(new QSerialPortInfoPrivate(dd)) +{ +} + /*! Destroys the QSerialPortInfo object. References to the values in the object become invalid. |