summaryrefslogtreecommitdiffstats
path: root/src/serialport/qserialport.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/serialport/qserialport.cpp')
-rw-r--r--src/serialport/qserialport.cpp18
1 files changed, 6 insertions, 12 deletions
diff --git a/src/serialport/qserialport.cpp b/src/serialport/qserialport.cpp
index f4f7478d..cc3e211b 100644
--- a/src/serialport/qserialport.cpp
+++ b/src/serialport/qserialport.cpp
@@ -36,6 +36,7 @@
#include "qserialport.h"
#include "qserialportinfo.h"
+#include "qserialportinfo_p.h"
#include "qserialport_p.h"
@@ -448,7 +449,7 @@ QSerialPort::~QSerialPort()
void QSerialPort::setPortName(const QString &name)
{
Q_D(QSerialPort);
- d->systemLocation = QSerialPortPrivate::portNameToSystemLocation(name);
+ d->systemLocation = QSerialPortInfoPrivate::portNameToSystemLocation(name);
}
/*!
@@ -459,7 +460,7 @@ void QSerialPort::setPortName(const QString &name)
void QSerialPort::setPort(const QSerialPortInfo &serialPortInfo)
{
Q_D(QSerialPort);
- d->systemLocation = QSerialPortPrivate::portNameToSystemLocation(serialPortInfo.systemLocation());
+ d->systemLocation = serialPortInfo.systemLocation();
}
/*!
@@ -473,23 +474,16 @@ void QSerialPort::setPort(const QSerialPortInfo &serialPortInfo)
\li Brief Description
\row
\li Windows
- \li Removes the prefix "\\\\.\\" from the system location
+ \li Removes the prefix "\\\\.\\" or "//./" from the system location
and returns the remainder of the string.
\row
\li Windows CE
\li Removes the suffix ":" from the system location
and returns the remainder of the string.
\row
- \li GNU/Linux
+ \li Unix, BSD
\li Removes the prefix "/dev/" from the system location
and returns the remainder of the string.
- \row
- \li Mac OSX
- \li Removes the prefix "/dev/cu." and "/dev/tty." from the
- system location and returns the remainder of the string.
- \row
- \li Other *nix
- \li The same as for GNU/Linux.
\endtable
\sa setPort(), QSerialPortInfo::portName()
@@ -497,7 +491,7 @@ void QSerialPort::setPort(const QSerialPortInfo &serialPortInfo)
QString QSerialPort::portName() const
{
Q_D(const QSerialPort);
- return QSerialPortPrivate::portNameFromSystemLocation(d->systemLocation);
+ return QSerialPortInfoPrivate::portNameFromSystemLocation(d->systemLocation);
}
/*!