QTfrontend/net/netudpwidget.cpp
changeset 6616 f77bb02b669f
parent 6060 fdfc01419815
child 6700 e04da46ee43c
--- a/QTfrontend/net/netudpwidget.cpp	Mon Jan 30 23:20:28 2012 +0100
+++ b/QTfrontend/net/netudpwidget.cpp	Mon Jan 30 17:32:18 2012 -0500
@@ -22,7 +22,7 @@
 #include "netudpwidget.h"
 
 HWNetUdpModel::HWNetUdpModel(QObject* parent) :
-  HWNetServersModel(parent)
+    HWNetServersModel(parent)
 {
     pUdpSocket = new QUdpSocket(this);
 
@@ -41,7 +41,8 @@
 
 void HWNetUdpModel::onClientRead()
 {
-    while (pUdpSocket->hasPendingDatagrams()) {
+    while (pUdpSocket->hasPendingDatagrams())
+    {
         QByteArray datagram;
         datagram.resize(pUdpSocket->pendingDatagramSize());
         QHostAddress clientAddr;
@@ -50,7 +51,8 @@
         pUdpSocket->readDatagram(datagram.data(), datagram.size(), &clientAddr, &clientPort);
 
         QString packet = QString::fromUtf8(datagram.data());
-        if(packet.startsWith("hedgewars server")) {
+        if(packet.startsWith("hedgewars server"))
+        {
             QStringList sl;
             sl << packet.remove(0, 17) << clientAddr.toString() << "46631";
             games.append(sl);
@@ -64,9 +66,9 @@
                              int role) const
 {
     if (!index.isValid() || index.row() < 0
-        || index.row() >= games.size()
-        || role != Qt::DisplayRole)
-    return QVariant();
+            || index.row() >= games.size()
+            || role != Qt::DisplayRole)
+        return QVariant();
 
     return games[index.row()][index.column()];
 }