diff options
author | Simon Hausmann <simon.hausmann@qt.io> | 2019-09-19 07:25:51 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@qt.io> | 2019-09-19 08:38:53 +0200 |
commit | 4d457e2fd34b0a715d92f00b03fdbde09e58eb93 (patch) | |
tree | e07d8f5d65eaabf43196b4c093c5677a1b5ca2cf /examples/serialport/cenumerator/main.cpp | |
parent | 055731b3a0d0f90741d7226ef4d885e56508aa56 (diff) | |
parent | f602b8163fb61d260f331ae7cabba591bde85fb4 (diff) |
Merge "Merge remote-tracking branch 'origin/wip/qt6' into dev"
Diffstat (limited to 'examples/serialport/cenumerator/main.cpp')
-rw-r--r-- | examples/serialport/cenumerator/main.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/examples/serialport/cenumerator/main.cpp b/examples/serialport/cenumerator/main.cpp index 902a7935..05a37154 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,18 +69,18 @@ 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; + : blankString) << Qt::endl; } return 0; |