|
|
|
@ -80,6 +80,10 @@ void NetController::setData(QString address, QJsonObject server, ServerModel *mo
|
|
|
|
|
|
|
|
|
|
mi = model->index(0, ServerData::VERSION);
|
|
|
|
|
model->setData(mi, server["version"].toString());
|
|
|
|
|
|
|
|
|
|
mi = model->index(0, ServerData::PASSW);
|
|
|
|
|
model->setData(mi, server["passw"].toBool());
|
|
|
|
|
|
|
|
|
|
mi = model->index(0, ServerData::PING);
|
|
|
|
|
|
|
|
|
|
QStringList addr = address.split(":");
|
|
|
|
@ -152,6 +156,7 @@ bool NetController::downloadInfo(QAbstractItemModel *pModel, QModelIndex index)
|
|
|
|
|
qDebug() << server["players"].toInt();
|
|
|
|
|
qDebug() << server["max_players"].toInt();
|
|
|
|
|
qDebug() << server["version"].toString();
|
|
|
|
|
qDebug() << server["passw"].toBool();
|
|
|
|
|
|
|
|
|
|
QVector<ServerData>::Iterator value = std::find_if(model->myData.begin(), model->myData.end(), pattern(iter.key()));
|
|
|
|
|
if(value == model->myData.end())
|
|
|
|
@ -213,6 +218,7 @@ void NetController::updateInfo()
|
|
|
|
|
qDebug() << map["players"].toInt();
|
|
|
|
|
qDebug() << map["max_players"].toInt();
|
|
|
|
|
qDebug() << map["version"].toString();
|
|
|
|
|
qDebug() << map["passw"].toBool();
|
|
|
|
|
|
|
|
|
|
sd->hostName = map["hostname"].toString();
|
|
|
|
|
sd->modName = map["modname"].toString();
|
|
|
|
|