Read-Only Configuration-Database support (#1046)

This commit is contained in:
LordGrey
2020-11-01 19:47:30 +01:00
committed by GitHub
parent 85a55de28c
commit bb652ade36
35 changed files with 268 additions and 90 deletions

View File

@@ -9,11 +9,12 @@
HyperionIManager* HyperionIManager::HIMinstance;
HyperionIManager::HyperionIManager(const QString& rootPath, QObject* parent)
HyperionIManager::HyperionIManager(const QString& rootPath, QObject* parent, bool readonlyMode)
: QObject(parent)
, _log(Logger::getInstance("HYPERION"))
, _instanceTable( new InstanceTable(rootPath, this) )
, _instanceTable( new InstanceTable(rootPath, this, readonlyMode) )
, _rootPath( rootPath )
, _readonlyMode(readonlyMode)
{
HIMinstance = this;
qRegisterMetaType<InstanceState>("InstanceState");
@@ -75,7 +76,7 @@ bool HyperionIManager::startInstance(quint8 inst, bool block, QObject* caller, i
{
QThread* hyperionThread = new QThread();
hyperionThread->setObjectName("HyperionThread");
Hyperion* hyperion = new Hyperion(inst);
Hyperion* hyperion = new Hyperion(inst, _readonlyMode);
hyperion->moveToThread(hyperionThread);
// setup thread management
connect(hyperionThread, &QThread::started, hyperion, &Hyperion::start);