Commit 42496770 authored by Marc Mutz's avatar Marc Mutz
Browse files

QBluetoothSocket/bluez: fix QString::arg() usage


QString::arg() returns the new value but leaves *this unchanged.

Found by GCC 7 (-Wunused-result).

Change-Id: I8a0ddb801ded94365f0e9a7ae13a37a96c7f437a
Reviewed-by: default avatarLars Knoll <lars.knoll@qt.io>
parent d8817ceb
Branches
Tags
No related merge requests found
Showing with 2 additions and 4 deletions
...@@ -251,8 +251,7 @@ void QBluetoothSocketPrivate::_q_writeNotify() ...@@ -251,8 +251,7 @@ void QBluetoothSocketPrivate::_q_writeNotify()
break; break;
default: default:
// every other case returns error // every other case returns error
errorString = QBluetoothSocket::tr("Network Error: %1"); errorString = QBluetoothSocket::tr("Network Error: %1").arg(qt_error_string(errno)) ;
errorString.arg(qt_error_string(errno));
q->setSocketError(QBluetoothSocket::NetworkError); q->setSocketError(QBluetoothSocket::NetworkError);
break; break;
} }
...@@ -507,8 +506,7 @@ qint64 QBluetoothSocketPrivate::writeData(const char *data, qint64 maxSize) ...@@ -507,8 +506,7 @@ qint64 QBluetoothSocketPrivate::writeData(const char *data, qint64 maxSize)
sz = 0; sz = 0;
break; break;
default: default:
errorString = QBluetoothSocket::tr("Network Error: %1"); errorString = QBluetoothSocket::tr("Network Error: %1").arg(qt_error_string(errno));
errorString.arg(qt_error_string(errno));
q->setSocketError(QBluetoothSocket::NetworkError); q->setSocketError(QBluetoothSocket::NetworkError);
} }
} }
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment