Merge PR #5323: BUILD(client): Add missing ifdef guards

0e17c53 introduced a migration system
from migrating from the old shortcut format to the newer one (on
Windows) but it seems in this new function it was forgotten to check
whether support for GKey and/or XBox-Input was actually included or not.

This could lead to compile errors when e.g. using -Dgkey=OFF when
invoking cmake.

This PR fixes that by adding the mentioned include-guards.

Fixes #5322
This commit is contained in:
Robert Adam 2021-11-21 17:27:21 +01:00 committed by GitHub
commit e2d5fcc6c8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -229,8 +229,14 @@ QList< Shortcut > GlobalShortcutWin::migrateSettings(const QList< Shortcut > &ol
}
if (button.userType() == qMetaTypeId< InputHid >() || button.userType() == qMetaTypeId< InputKeyboard >()
|| button.userType() == qMetaTypeId< InputMouse >() || button.userType() == qMetaTypeId< InputXinput >()
|| button.userType() == qMetaTypeId< InputGkey >()) {
|| button.userType() == qMetaTypeId< InputMouse >()
#ifdef USE_XBOXINPUT
|| button.userType() == qMetaTypeId< InputXinput >()
#endif
#ifdef USE_GKEY
|| button.userType() == qMetaTypeId< InputGkey >()
#endif
) {
// Already in the new format.
continue;
}