summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@kdab.com>2017-03-22 11:57:22 +0100
committerMarc Mutz <marc.mutz@kdab.com>2017-03-24 07:42:54 +0000
commit42496770e96334efdce9c29410051695be3310fb (patch)
tree931b32afeb14328ac0483fcb464cc7f93448def0
parentd8817cebf11c9212f85a5359262d321f3c205c02 (diff)
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: Lars Knoll <lars.knoll@qt.io>
-rw-r--r--src/bluetooth/qbluetoothsocket_bluez.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/bluetooth/qbluetoothsocket_bluez.cpp b/src/bluetooth/qbluetoothsocket_bluez.cpp
index 803df6df..162a1a0b 100644
--- a/src/bluetooth/qbluetoothsocket_bluez.cpp
+++ b/src/bluetooth/qbluetoothsocket_bluez.cpp
@@ -251,8 +251,7 @@ void QBluetoothSocketPrivate::_q_writeNotify()
break;
default:
// every other case returns error
- errorString = QBluetoothSocket::tr("Network Error: %1");
- errorString.arg(qt_error_string(errno));
+ errorString = QBluetoothSocket::tr("Network Error: %1").arg(qt_error_string(errno)) ;
q->setSocketError(QBluetoothSocket::NetworkError);
break;
}
@@ -507,8 +506,7 @@ qint64 QBluetoothSocketPrivate::writeData(const char *data, qint64 maxSize)
sz = 0;
break;
default:
- errorString = QBluetoothSocket::tr("Network Error: %1");
- errorString.arg(qt_error_string(errno));
+ errorString = QBluetoothSocket::tr("Network Error: %1").arg(qt_error_string(errno));
q->setSocketError(QBluetoothSocket::NetworkError);
}
}