diff options
author | Robert Adam <dev@robert-adam.de> | 2022-03-31 17:43:42 +0300 |
---|---|---|
committer | Robert Adam <dev@robert-adam.de> | 2022-03-31 19:21:52 +0300 |
commit | 8afeaf693834988656a8bd8f95cfb0e5e87a386d (patch) | |
tree | f0e7571399f14cf0a95a6a05bed49cf451ebb745 /src | |
parent | c89610a794973394d988303e39da5b03b991187a (diff) |
BUILD(client): Make compilable with Qt < 5.6
Diffstat (limited to 'src')
-rw-r--r-- | src/mumble/SearchDialog.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/mumble/SearchDialog.cpp b/src/mumble/SearchDialog.cpp index dfc228b2c..009aa8829 100644 --- a/src/mumble/SearchDialog.cpp +++ b/src/mumble/SearchDialog.cpp @@ -489,7 +489,13 @@ void SearchDialog::keyPressEvent(QKeyEvent *event) { return; } +#if QT_VERSION >= QT_VERSION_CHECK(5, 6, 0) if (event->matches(QKeySequence::Cancel)) { +#else + // Before Qt 5.6, no standard key for the cancel operation was defined. Thus, in these cases, we hardcode it to be + // Escape + if (event->key() == Qt::Key_Escape) { +#endif event->accept(); // Mimic behavior of dialogs (close on Esc) close(); |