Changeset View
Changeset View
Standalone View
Standalone View
src/plasma/containmentactions.cpp
Show First 20 Lines • Show All 125 Lines • ▼ Show 20 Line(s) | 121 | case QEvent::MouseButtonDblClick: { | |||
---|---|---|---|---|---|
126 | modifiers = e->modifiers(); | 126 | modifiers = e->modifiers(); | ||
127 | break; | 127 | break; | ||
128 | } | 128 | } | ||
129 | case QEvent::Wheel: { | 129 | case QEvent::Wheel: { | ||
130 | QWheelEvent *e = static_cast<QWheelEvent *>(event); | 130 | QWheelEvent *e = static_cast<QWheelEvent *>(event); | ||
131 | int o = QObject::staticQtMetaObject.indexOfEnumerator("Orientations"); | 131 | int o = QObject::staticQtMetaObject.indexOfEnumerator("Orientations"); | ||
132 | QMetaEnum orient = QObject::staticQtMetaObject.enumerator(o); | 132 | QMetaEnum orient = QObject::staticQtMetaObject.enumerator(o); | ||
133 | trigger = QStringLiteral("wheel:"); | 133 | trigger = QStringLiteral("wheel:"); | ||
134 | #if QT_VERSION < QT_VERSION_CHECK(5, 14, 0) | ||||
134 | trigger += QString::fromLatin1(orient.valueToKey(e->orientation())); | 135 | trigger += QString::fromLatin1(orient.valueToKey(e->orientation())); | ||
136 | #else | ||||
137 | // ContainmentInterface::wheelEvent uses angleDelta.y() | ||||
138 | // To support both, should we just remove this orientation string? | ||||
139 | trigger += QStringLiteral("Vertical"); | ||||
140 | #endif | ||||
135 | modifiers = e->modifiers(); | 141 | modifiers = e->modifiers(); | ||
136 | break; | 142 | break; | ||
137 | } | 143 | } | ||
138 | case QEvent::ContextMenu: { | 144 | case QEvent::ContextMenu: { | ||
139 | int m = QObject::staticQtMetaObject.indexOfEnumerator("MouseButtons"); | 145 | int m = QObject::staticQtMetaObject.indexOfEnumerator("MouseButtons"); | ||
140 | QMetaEnum mouse = QObject::staticQtMetaObject.enumerator(m); | 146 | QMetaEnum mouse = QObject::staticQtMetaObject.enumerator(m); | ||
141 | trigger = QString::fromLatin1(mouse.valueToKey(Qt::RightButton)); | 147 | trigger = QString::fromLatin1(mouse.valueToKey(Qt::RightButton)); | ||
142 | modifiers = Qt::NoModifier; | 148 | modifiers = Qt::NoModifier; | ||
Show All 21 Lines |