summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLaszlo Papp <lpapp@kde.org>2013-03-24 16:25:35 +0000
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-03-25 09:58:24 +0100
commit43d137e4b2023e6b5d9df9b89281eca4b70eecf8 (patch)
treef4517cf4c006c950f06c317d7adcab545f82e0ce
parent726571882cd9848c081c6c83c36f2b296d359b1b (diff)
downloadqtserialport-43d137e4b2023e6b5d9df9b89281eca4b70eecf8.tar.gz
Fix the broken serialport information obtaining on Mac
This regression was introduced by the following commit: ca59808315342560b5b09687fd47dbe537787ef7 It is due to the fact that the static method provides the string for the return value, and not in place for the "this" object. This was an oversight. Change-Id: I5fa5a25562abe1567d9423022072e012b4e66b45 Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com> Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
-rw-r--r--src/serialport/qserialportinfo_mac.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/serialport/qserialportinfo_mac.cpp b/src/serialport/qserialportinfo_mac.cpp
index 302d1e1..0378f19 100644
--- a/src/serialport/qserialportinfo_mac.cpp
+++ b/src/serialport/qserialportinfo_mac.cpp
@@ -197,7 +197,7 @@ QList<QSerialPortInfo> QSerialPortInfo::availablePorts()
buffer.data(),
buffer.size(),
kCFStringEncodingUTF8)) {
- serialPortInfo.d_ptr->device.fromUtf8(buffer);
+ serialPortInfo.d_ptr->device = QString::fromUtf8(buffer);
}
::CFRelease(device);
}
@@ -207,7 +207,7 @@ QList<QSerialPortInfo> QSerialPortInfo::availablePorts()
buffer.data(),
buffer.size(),
kCFStringEncodingUTF8)) {
- serialPortInfo.d_ptr->portName.fromUtf8(buffer);
+ serialPortInfo.d_ptr->portName = QString::fromUtf8(buffer);
}
::CFRelease(portName);
}
@@ -217,7 +217,7 @@ QList<QSerialPortInfo> QSerialPortInfo::availablePorts()
buffer.data(),
buffer.size(),
kCFStringEncodingUTF8)) {
- serialPortInfo.d_ptr->description.fromUtf8(buffer);
+ serialPortInfo.d_ptr->description = QString::fromUtf8(buffer);
}
::CFRelease(description);
}
@@ -227,7 +227,7 @@ QList<QSerialPortInfo> QSerialPortInfo::availablePorts()
buffer.data(),
buffer.size(),
kCFStringEncodingUTF8)) {
- serialPortInfo.d_ptr->manufacturer.fromUtf8(buffer);
+ serialPortInfo.d_ptr->manufacturer = QString::fromUtf8(buffer);
}
::CFRelease(manufacturer);
}