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