summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2017-04-01 21:13:15 -0700
committerAlex Blasche <alexander.blasche@qt.io>2017-04-03 06:17:54 +0000
commit382bf8f2c656e5cb52dbad4b5b66b75a2e941f5c (patch)
tree1827197745467f3554ad6eaed861f4cf3e56f7c0
parentb20ebe24d0f64f75a40f09b4983b3996cd46b9cb (diff)
Correct the use of QString::arg
It returns an updated QString, without modifying the variable it was called on. Found by Clang when building: qbluetoothsocket_bluez.cpp:255:17: warning: ignoring return value of function declared with 'warn_unused_result' attribute [-Wunused-result] Change-Id: I27b55fdf514247549455fffd14b1795de236d488 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
-rw-r--r--src/bluetooth/qbluetoothsocket_bluez.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/bluetooth/qbluetoothsocket_bluez.cpp b/src/bluetooth/qbluetoothsocket_bluez.cpp
index 803df6df..83d8c308 100644
--- a/src/bluetooth/qbluetoothsocket_bluez.cpp
+++ b/src/bluetooth/qbluetoothsocket_bluez.cpp
@@ -251,8 +251,8 @@ 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 +507,8 @@ 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);
}
}