summaryrefslogtreecommitdiff
path: root/src/serialport/qserialportinfo.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/serialport/qserialportinfo.cpp')
-rw-r--r--src/serialport/qserialportinfo.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/serialport/qserialportinfo.cpp b/src/serialport/qserialportinfo.cpp
index 23a4d1c..26b275d 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)
{
}
@@ -73,7 +72,7 @@ QSerialPortInfo::QSerialPortInfo()
Constructs a copy of \a other.
*/
QSerialPortInfo::QSerialPortInfo(const QSerialPortInfo &other)
- : d_ptr(other.d_ptr ? new QSerialPortInfoPrivate(*other.d_ptr) : 0)
+ : d_ptr(other.d_ptr ? new QSerialPortInfoPrivate(*other.d_ptr) : Q_NULLPTR)
{
}
@@ -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.