Skip to content

Commit

Permalink
Supress deprecation warning on XKeycodeToKeysym
Browse files Browse the repository at this point in the history
  • Loading branch information
hacst committed Oct 28, 2015
1 parent 1090423 commit 2062b24
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/mumble/GlobalShortcut_unix.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,16 @@ QString GlobalShortcutX::buttonName(const QVariant &v) {
if (!ok)
return QString();
if ((key < 0x118) || (key >= 0x128)) {

// For backwards compatibility reasons we want to keep using the
// old function as long as possible. The replacement function
// XkbKeycodeToKeysym requires the XKB extension which isn't
// guaranteed to be present.
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
KeySym ks=XKeycodeToKeysym(display, static_cast<KeyCode>(key), 0);
#pragma GCC diagnostic pop

if (ks == NoSymbol) {
return QLatin1String("0x")+QString::number(key,16);
} else {
Expand Down

0 comments on commit 2062b24

Please sign in to comment.