mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2025-03-01 10:33:28 +00:00
Move JsonProcessing from JsonClientConnection to own class (#444)
* update * Tell me why...
This commit is contained in:
@@ -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
|
||||
)
|
||||
|
||||
|
1242
libsrc/utils/JsonProcessor.cpp
Normal file
1242
libsrc/utils/JsonProcessor.cpp
Normal file
File diff suppressed because it is too large
Load Diff
@@ -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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user