| 354 | } |
| 355 | |
| 356 | bool HyperHdrManager::stopInstance(quint8 instance) |
| 357 | { |
| 358 | // inst 0 can't be stopped |
| 359 | if (!isInstAllowed(instance)) |
| 360 | return false; |
| 361 | |
| 362 | if (_instanceTable->instanceExist(instance)) |
| 363 | { |
| 364 | if (_runningInstances.contains(instance)) |
| 365 | { |
| 366 | disconnect(this, nullptr, _runningInstances.value(instance).get(), nullptr); |
| 367 | |
| 368 | _instanceTable->setEnable(instance, false); |
| 369 | |
| 370 | _runningInstances.remove(instance); |
| 371 | |
| 372 | emit SignalInstanceStateChanged(InstanceState::STOP, instance); |
| 373 | emit SignalInstancesListChanged(); |
| 374 | |
| 375 | return true; |
| 376 | } |
| 377 | Debug(_log, "Can't stop HyperHDR instance index '%d' with name '%s' it's not running'", instance, QSTRING_CSTR(_instanceTable->getNamebyIndex(instance))); |
| 378 | return false; |
| 379 | } |
| 380 | Debug(_log, "Can't stop HyperHDR instance index '%d' it doesn't exist in DB", instance); |
| 381 | return false; |
| 382 | } |
| 383 | |
| 384 | bool HyperHdrManager::createInstance(const QString& name, bool start) |
| 385 | { |
nothing calls this directly
no test coverage detected