1 | |
---|
2 | # HG changeset patch |
---|
3 | # User John W. Eaton <jwe@octave.org> |
---|
4 | # Date 1552337370 0 |
---|
5 | # Node ID e247ecdee41da2c722cae213b78ce215044a0025 |
---|
6 | # Parent e201cf0c736028bcaf565e71dee213ea53c50051 |
---|
7 | allow building without QGuiApplication to work again |
---|
8 | |
---|
9 | * shortcut-manager.cc (enter_shortcut::enter_shortcut): |
---|
10 | Include QApplication instead of QGuiApplication. |
---|
11 | Use QApplication::keyboardModifiers if HAVE_QGUIAPPLICATION is not |
---|
12 | defined. |
---|
13 | |
---|
14 | diff --git a/libgui/src/shortcut-manager.cc b/libgui/src/shortcut-manager.cc |
---|
15 | --- a/libgui/src/shortcut-manager.cc |
---|
16 | +++ b/libgui/src/shortcut-manager.cc |
---|
17 | @@ -28,7 +28,7 @@ |
---|
18 | #include <QMessageBox> |
---|
19 | #include <QDebug> |
---|
20 | #include <QGridLayout> |
---|
21 | -#include <QGuiApplication> |
---|
22 | +#include <QApplication> |
---|
23 | #include <QVBoxLayout> |
---|
24 | #include <QDialogButtonBox> |
---|
25 | #include <QKeySequence> |
---|
26 | @@ -70,7 +70,11 @@ |
---|
27 | if (key == Qt::Key_unknown || key == 0) |
---|
28 | return; |
---|
29 | |
---|
30 | +#if defined (HAVE_QGUIAPPLICATION) |
---|
31 | Qt::KeyboardModifiers modifiers = QGuiApplication::keyboardModifiers (); //e->modifiers (); |
---|
32 | +#else |
---|
33 | + Qt::KeyboardModifiers modifiers = QApplication::keyboardModifiers (); //e->modifiers (); |
---|
34 | +#endif |
---|
35 | |
---|
36 | if (m_shift_modifier || (modifiers & Qt::ShiftModifier)) |
---|
37 | key += Qt::SHIFT; |
---|
38 | |
---|