@ -14,6 +14,12 @@ void PingHelper::Add(int row, const AddrPair &addrPair)
pingThread->start();
}
void PingHelper::Reset()
{
//if (pingThread->isRunning())
Stop();
void PingHelper::Stop()
emit pingUpdater->stop();
@ -17,6 +17,7 @@ class PingHelper : public QObject
Q_OBJECT
public:
void Reset();
void Add(int row, const AddrPair &addrPair);
void Stop();
void SetModel(QAbstractTableModel *model);
@ -42,7 +42,7 @@ void PingUpdater::process()
unsigned ping = PingRakNetServer(server.second.first.toLatin1(), server.second.second);
qDebug() << "Pong from" << server.second.first + "|" + QString::number(server.second.second)
<< ":" << ping << "ms";
<< ":" << ping << "ms" << "Sizeof servers: " << servers.size();
emit updateModel(server.first, ping);
@ -29,6 +29,7 @@ void QueryHelper::refresh()
if (!queryThread->isRunning())
_model->removeRows(0, _model->rowCount());
PingHelper::Get().Stop();
queryThread->start();
emit started();