diff options
author | Alexandru Croitor <alexandru.croitor@qt.io> | 2019-07-31 17:30:57 +0200 |
---|---|---|
committer | Alexandru Croitor <alexandru.croitor@qt.io> | 2019-08-01 09:53:05 +0200 |
commit | fc7d7799b279d2c1fc2019966604f04e36218470 (patch) | |
tree | 46e247bae48639b8110a7e08e1267524b2b4aeaf /examples/serialport/cenumerator/main.cpp | |
parent | 126809f150f03ab07b94bb508c89cea25440ac41 (diff) |
Fix Qt6 build
Change-Id: I6fdfe8b21efe92ba97b7c833997432e670e5937c
Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
Diffstat (limited to 'examples/serialport/cenumerator/main.cpp')
-rw-r--r-- | examples/serialport/cenumerator/main.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/examples/serialport/cenumerator/main.cpp b/examples/serialport/cenumerator/main.cpp index af6d7e41..5e1b645e 100644 --- a/examples/serialport/cenumerator/main.cpp +++ b/examples/serialport/cenumerator/main.cpp @@ -58,7 +58,7 @@ int main(int argc, char *argv[]) QTextStream out(stdout); const auto serialPortInfos = QSerialPortInfo::availablePorts(); - out << "Total number of ports available: " << serialPortInfos.count() << endl; + out << "Total number of ports available: " << serialPortInfos.count() << Qt::endl; const QString blankString = "N/A"; QString description; @@ -69,19 +69,19 @@ int main(int argc, char *argv[]) description = serialPortInfo.description(); manufacturer = serialPortInfo.manufacturer(); serialNumber = serialPortInfo.serialNumber(); - out << endl - << "Port: " << serialPortInfo.portName() << endl - << "Location: " << serialPortInfo.systemLocation() << endl - << "Description: " << (!description.isEmpty() ? description : blankString) << endl - << "Manufacturer: " << (!manufacturer.isEmpty() ? manufacturer : blankString) << endl - << "Serial number: " << (!serialNumber.isEmpty() ? serialNumber : blankString) << endl + out << Qt::endl + << "Port: " << serialPortInfo.portName() << Qt::endl + << "Location: " << serialPortInfo.systemLocation() << Qt::endl + << "Description: " << (!description.isEmpty() ? description : blankString) << Qt::endl + << "Manufacturer: " << (!manufacturer.isEmpty() ? manufacturer : blankString) << Qt::endl + << "Serial number: " << (!serialNumber.isEmpty() ? serialNumber : blankString) << Qt::endl << "Vendor Identifier: " << (serialPortInfo.hasVendorIdentifier() ? QByteArray::number(serialPortInfo.vendorIdentifier(), 16) - : blankString) << endl + : blankString) << Qt::endl << "Product Identifier: " << (serialPortInfo.hasProductIdentifier() ? QByteArray::number(serialPortInfo.productIdentifier(), 16) - : blankString) << endl - << "Busy: " << (serialPortInfo.isBusy() ? "Yes" : "No") << endl; + : blankString) << Qt::endl + << "Busy: " << (serialPortInfo.isBusy() ? "Yes" : "No") << Qt::endl; } return 0; |