MCPcopy Create free account
hub / github.com/awawa-dev/HyperHDR / stopInstance

Method stopInstance

sources/base/HyperHdrManager.cpp:356–382  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

354}
355
356bool 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
384bool HyperHdrManager::createInstance(const QString& name, bool start)
385{

Callers

nothing calls this directly

Calls 5

instanceExistMethod · 0.80
getNamebyIndexMethod · 0.80
getMethod · 0.45
valueMethod · 0.45
setEnableMethod · 0.45

Tested by

no test coverage detected