mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-22 23:05:36 +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;
|
||||
|
||||
@@ -39,6 +39,7 @@ namespace BlackCore
|
||||
{
|
||||
// workaround if a binding is taking place in an empty context
|
||||
if (!sApp || sApp->isShuttingDown()) { return; }
|
||||
if (sApp->getApplicationInfo().isUnitTest()) { return; }
|
||||
|
||||
const QString a = CActionBind::registerAction(action, icon);
|
||||
Q_ASSERT_X(sApp && sApp->getInputManager(), Q_FUNC_INFO, "Missing input manager");
|
||||
|
||||
@@ -1369,7 +1369,7 @@ namespace BlackCore
|
||||
}
|
||||
|
||||
const QStringList verifyErrors = CDirectoryUtils::verifyRuntimeDirectoriesAndFiles();
|
||||
if (!verifyErrors.isEmpty())
|
||||
if (!verifyErrors.isEmpty() && !m_applicationInfo.isUnitTest())
|
||||
{
|
||||
this->cmdLineErrorMessage("Missing runtime directories/files: " + verifyErrors.join(", "));
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user