Add unit support to sensors
This commit is contained in:
parent
3e0ba165e8
commit
37c0c5d17b
12 changed files with 73 additions and 41 deletions
|
|
@ -38,9 +38,11 @@ void TcpServer::processIncomeingJson(const QByteArray& jsonbytes)
|
|||
{
|
||||
QJsonObject jsonobject = itemjson.toObject();
|
||||
std::shared_ptr<Item> item = Item::loadItem(jsonobject);
|
||||
item->setLoaded(FullList);
|
||||
if(item)
|
||||
{
|
||||
item->setLoaded(FullList);
|
||||
items.push_back(item);
|
||||
}
|
||||
}
|
||||
if(FullList && !items.empty())
|
||||
{
|
||||
|
|
@ -60,6 +62,7 @@ void TcpServer::processIncomeingJson(const QByteArray& jsonbytes)
|
|||
|
||||
bool TcpServer::launch(const QHostAddress &address, quint16 port)
|
||||
{
|
||||
qInfo()<<"Tcp server launched on"<<address<<"port"<<port;
|
||||
return server.listen(address, port);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue