From ff3fd7b0330cb76772066ce7162320f4dc1a5c28 Mon Sep 17 00:00:00 2001 From: Topi Reinio Date: Mon, 30 Mar 2020 15:01:44 +0200 Subject: Remove deprecated QTextStream operators from examples MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Use '\n' instead. Task-number: QTBUG-82532 Change-Id: I97aec4076bd46f23644099158f346a6ca32a4a0e Reviewed-by: Topi Reiniƶ --- examples/serialport/cwriterasync/serialportwriter.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'examples/serialport/cwriterasync/serialportwriter.cpp') diff --git a/examples/serialport/cwriterasync/serialportwriter.cpp b/examples/serialport/cwriterasync/serialportwriter.cpp index c2916bb2..1f2fedc2 100644 --- a/examples/serialport/cwriterasync/serialportwriter.cpp +++ b/examples/serialport/cwriterasync/serialportwriter.cpp @@ -71,7 +71,7 @@ void SerialPortWriter::handleBytesWritten(qint64 bytes) if (m_bytesWritten == m_writeData.size()) { m_bytesWritten = 0; m_standardOutput << QObject::tr("Data successfully sent to port %1") - .arg(m_serialPort->portName()) << endl; + .arg(m_serialPort->portName()) << "\n"; QCoreApplication::quit(); } } @@ -81,7 +81,7 @@ void SerialPortWriter::handleTimeout() m_standardOutput << QObject::tr("Operation timed out for port %1, error: %2") .arg(m_serialPort->portName()) .arg(m_serialPort->errorString()) - << endl; + << "\n"; QCoreApplication::exit(1); } @@ -92,7 +92,7 @@ void SerialPortWriter::handleError(QSerialPort::SerialPortError serialPortError) " the data to port %1, error: %2") .arg(m_serialPort->portName()) .arg(m_serialPort->errorString()) - << endl; + << "\n"; QCoreApplication::exit(1); } } @@ -107,13 +107,13 @@ void SerialPortWriter::write(const QByteArray &writeData) m_standardOutput << QObject::tr("Failed to write the data to port %1, error: %2") .arg(m_serialPort->portName()) .arg(m_serialPort->errorString()) - << endl; + << "\n"; QCoreApplication::exit(1); } else if (bytesWritten != m_writeData.size()) { m_standardOutput << QObject::tr("Failed to write all the data to port %1, error: %2") .arg(m_serialPort->portName()) .arg(m_serialPort->errorString()) - << endl; + << "\n"; QCoreApplication::exit(1); } -- cgit v1.2.3