summaryrefslogtreecommitdiff
path: root/src/serialport/qserialportinfo_win.cpp
diff options
context:
space:
mode:
authorLaszlo Papp <lpapp@kde.org>2013-11-06 08:37:47 +0000
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-11-06 09:55:30 +0100
commit8e0b66f1269c0516fd339a18b5644bf38a1e2412 (patch)
tree14bb8482e2ca6d7712657163f85a916b1f0671a4 /src/serialport/qserialportinfo_win.cpp
parent77f5e60cd23391f5103ac9c238066611b2fc4223 (diff)
downloadqtserialport-8e0b66f1269c0516fd339a18b5644bf38a1e2412.tar.gz
Define QStringLiteral when undefined (e.g. Qt 4)
This will allow us Qt 5 style coding. QLatin1String replaced everywhere where it works for Qt 4 and 5, namely: the direct literal passing. Note that the "standard" typo has also been fixed in this commit as the line had to change anyway, so it is not much of an additional noise. Change-Id: I8b7e4fe5f337441000bd3d8f58db528fdd0e175b Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com> Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com>
Diffstat (limited to 'src/serialport/qserialportinfo_win.cpp')
-rw-r--r--src/serialport/qserialportinfo_win.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/serialport/qserialportinfo_win.cpp b/src/serialport/qserialportinfo_win.cpp
index 45236a0..7eec46a 100644
--- a/src/serialport/qserialportinfo_win.cpp
+++ b/src/serialport/qserialportinfo_win.cpp
@@ -159,10 +159,10 @@ static QString devicePortName(HDEVINFO deviceInfoSet, PSP_DEVINFO_DATA deviceInf
QList<QSerialPortInfo> QSerialPortInfo::availablePorts()
{
- static const QString usbVendorIdentifierPrefix(QLatin1String("VID_"));
- static const QString usbProductIdentifierPrefix(QLatin1String("PID_"));
- static const QString pciVendorIdentifierPrefix(QLatin1String("VEN_"));
- static const QString pciDeviceIdentifierPrefix(QLatin1String("DEV_"));
+ static const QString usbVendorIdentifierPrefix(QStringLiteral("VID_"));
+ static const QString usbProductIdentifierPrefix(QStringLiteral("PID_"));
+ static const QString pciVendorIdentifierPrefix(QStringLiteral("VEN_"));
+ static const QString pciDeviceIdentifierPrefix(QStringLiteral("DEV_"));
static const int vendorIdentifierSize = 4;
static const int productIdentifierSize = 4;
@@ -184,7 +184,7 @@ QList<QSerialPortInfo> QSerialPortInfo::availablePorts()
QSerialPortInfo serialPortInfo;
QString s = devicePortName(deviceInfoSet, &deviceInfoData);
- if (s.isEmpty() || s.contains(QLatin1String("LPT")))
+ if (s.isEmpty() || s.contains(QStringLiteral("LPT")))
continue;
serialPortInfo.d_ptr->portName = s;