[AFV] Fixed context unittest that was broken by audio context changes

This commit is contained in:
Mat Sutcliffe
2019-10-06 16:40:04 +01:00
parent b90855d393
commit ec0a20b1d1
3 changed files with 6 additions and 2 deletions

View File

@@ -18,7 +18,8 @@ namespace BlackCore
QString CActionBind::registerAction(const QString &action, const QPixmap &icon)
{
if (!sApp || sApp->isShuttingDown()) return {};
if (!sApp || sApp->isShuttingDown()) { return {}; }
if (sApp->getApplicationInfo().isUnitTest()) { return {}; }
const QString a = CActionBind::normalizeAction(action);
Q_ASSERT_X(sApp && sApp->getInputManager(), Q_FUNC_INFO, "Missing input manager");
@@ -34,6 +35,8 @@ namespace BlackCore
void CActionBind::unbind()
{
if (m_index < 0) { return; }
if (sApp->getApplicationInfo().isUnitTest()) { return; }
Q_ASSERT_X(sApp && sApp->getInputManager(), Q_FUNC_INFO, "Missing input manager");
sApp->getInputManager()->unbind(m_index);
m_index = -1;