--- a/QTfrontend/net/netudpwidget.cpp Wed Jan 24 21:05:34 2018 +0100
+++ b/QTfrontend/net/netudpwidget.cpp Wed Jan 24 22:20:10 2018 +0100
@@ -33,15 +33,19 @@
void HWNetUdpModel::updateList()
{
- games.clear();
+ beginResetModel();
+
+ games.clear();
- reset();
+ endResetModel();
- pUdpSocket->writeDatagram("hedgewars client", QHostAddress::Broadcast, NETGAME_DEFAULT_PORT);
+ pUdpSocket->writeDatagram("hedgewars client", QHostAddress::Broadcast, NETGAME_DEFAULT_PORT);
}
void HWNetUdpModel::onClientRead()
{
+ beginResetModel();
+
while (pUdpSocket->hasPendingDatagrams())
{
QByteArray datagram;
@@ -60,7 +64,7 @@
}
}
- reset();
+ endResetModel();
}
QVariant HWNetUdpModel::data(const QModelIndex &index,