mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2025-03-01 10:33:28 +00:00
implement hyperion restart via webui (#242)
* first try * implement hyperion restart. core function is good, but needs a beeter structuring- something for next refactoring session ;-) * several fixes (including osx) merge with upstream some refactoring * add some eye candy to webui
This commit is contained in:
@@ -657,24 +657,26 @@ unsigned Hyperion::getLedCount() const
|
||||
|
||||
bool Hyperion::configModified()
|
||||
{
|
||||
bool isModified = false;
|
||||
QFile f(_configFile.c_str());
|
||||
if (f.open(QFile::ReadOnly))
|
||||
{
|
||||
QCryptographicHash hash(QCryptographicHash::Sha1);
|
||||
if (hash.addData(&f))
|
||||
if (hash.addData(&f))
|
||||
{
|
||||
if (_configHash.size() == 0)
|
||||
{
|
||||
if (_configHash.size() == 0)
|
||||
{
|
||||
_configHash = hash.result();
|
||||
qDebug(_configHash.toHex());
|
||||
return false;
|
||||
}
|
||||
return _configHash != hash.result();
|
||||
_configHash = hash.result();
|
||||
}
|
||||
else
|
||||
{
|
||||
isModified = _configHash != hash.result();
|
||||
}
|
||||
}
|
||||
}
|
||||
f.close();
|
||||
|
||||
return false;
|
||||
return isModified;
|
||||
}
|
||||
|
||||
void Hyperion::registerPriority(const std::string name, const int priority)
|
||||
|
Reference in New Issue
Block a user