Move JsonProcessing from JsonClientConnection to own class (#444)

* update

* Tell me why...
This commit is contained in:
brindosch
2017-06-24 11:52:22 +02:00
committed by GitHub
parent dd5f840125
commit 5da871dc9f
10 changed files with 1709 additions and 1630 deletions

View File

@@ -6,6 +6,7 @@ SET(CURRENT_SOURCE_DIR ${CMAKE_SOURCE_DIR}/libsrc/utils)
SET(Utils_QT_HEADERS
${CURRENT_HEADER_DIR}/Logger.h
${CURRENT_HEADER_DIR}/Stats.h
${CURRENT_HEADER_DIR}/JsonProcessor.h
)
SET(Utils_HEADERS
@@ -46,6 +47,7 @@ SET(Utils_SOURCES
${CURRENT_SOURCE_DIR}/RgbToRgbw.cpp
${CURRENT_SOURCE_DIR}/SysInfo.cpp
${CURRENT_SOURCE_DIR}/Stats.cpp
${CURRENT_SOURCE_DIR}/JsonProcessor.cpp
${CURRENT_SOURCE_DIR}/jsonschema/QJsonSchemaChecker.cpp
)

File diff suppressed because it is too large Load Diff

View File

@@ -23,7 +23,7 @@ Stats::Stats()
{
if (!(interface.flags() & QNetworkInterface::IsLoopBack))
{
_hyperion->id = QString(QCryptographicHash::hash(interface.hardwareAddress().toLocal8Bit().append(_hyperion->getConfigFile().toLocal8Bit()),QCryptographicHash::Sha1).toHex());
_hyperion->id = QString(QCryptographicHash::hash(interface.hardwareAddress().toLocal8Bit().append(_hyperion->getConfigFileName().toLocal8Bit()),QCryptographicHash::Sha1).toHex());
_hash = QString(QCryptographicHash::hash(interface.hardwareAddress().toLocal8Bit(),QCryptographicHash::Sha1).toHex());
break;
}
@@ -34,7 +34,7 @@ Stats::Stats()
{
Warning(_log, "No interface found, abort");
// fallback id
_hyperion->id = QString(QCryptographicHash::hash(_hyperion->getConfigFile().toLocal8Bit(),QCryptographicHash::Sha1).toHex());
_hyperion->id = QString(QCryptographicHash::hash(_hyperion->getConfigFileName().toLocal8Bit(),QCryptographicHash::Sha1).toHex());
return;
}