Network chat: style fixes

The if statements were originally broken to fit 80-column width
but didn't have the braces we typically require.
It anyway fits inside our new 100-column width, so just do that.

Task-number: QTBUG-108873
Change-Id: Ib632f35607e6b716141c4c5d8211de7a0745c6ab
Reviewed-by: Konrad Kujawa <konrad.kujawa@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
This commit is contained in:
Mårten Nordheim 2023-05-23 13:20:44 +02:00
parent e33bbdb0ea
commit f3d2e2f555
2 changed files with 2 additions and 4 deletions

View File

@ -67,8 +67,7 @@ void Client::newConnection(Connection *connection)
void Client::readyForUse()
{
Connection *connection = qobject_cast<Connection *>(sender());
if (!connection || hasConnection(connection->peerAddress(),
connection->peerPort()))
if (!connection || hasConnection(connection->peerAddress(), connection->peerPort()))
return;
connect(connection, &Connection::newMessage,

View File

@ -72,8 +72,7 @@ void PeerManager::sendBroadcastDatagram()
bool validBroadcastAddresses = true;
for (const QHostAddress &address : std::as_const(broadcastAddresses)) {
if (broadcastSocket.writeDatagram(datagram, address,
broadcastPort) == -1)
if (broadcastSocket.writeDatagram(datagram, address, broadcastPort) == -1)
validBroadcastAddresses = false;
}