diff options
Diffstat (limited to 'src/mumble/SearchDialog.cpp')
-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(); |