Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mumble-voip/mumble.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRobert Adam <dev@robert-adam.de>2022-03-31 17:43:42 +0300
committerRobert Adam <dev@robert-adam.de>2022-03-31 19:21:52 +0300
commit8afeaf693834988656a8bd8f95cfb0e5e87a386d (patch)
treef0e7571399f14cf0a95a6a05bed49cf451ebb745 /src
parentc89610a794973394d988303e39da5b03b991187a (diff)
BUILD(client): Make compilable with Qt < 5.6
Diffstat (limited to 'src')
-rw-r--r--src/mumble/SearchDialog.cpp6
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();