mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-23 07:15:35 +08:00
[AFV] Fixed context unittest that was broken by audio context changes
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user