Delay creating input devices to when required

Every first call to CInputManager::instance() was automatically creating
the low level input devices. This was not always desired and therefore
creation is now explicit via function.
Unit tests do not need the devices created. In contrast, Windows unit tests
failed since Windows didn't like the Jenkins service childs to allocate
DInput devices.

T391
This commit is contained in:
Roland Winklmeier
2018-10-05 21:50:39 +02:00
committed by Klaus Basan
parent 81bbcc56cd
commit 832082c5bc
3 changed files with 17 additions and 5 deletions

View File

@@ -175,6 +175,11 @@ namespace BlackCore
// startup done
connect(this, &CApplication::startUpCompleted, this, &CApplication::onStartUpCompleted, Qt::QueuedConnection);
connect(this, &CApplication::coreFacadeStarted, this, &CApplication::onCoreFacadeStarted, Qt::QueuedConnection);
if (!this->getApplicationInfo().isUnitTest())
{
CInputManager::instance()->createDevices();
}
}
}