diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2023-02-01 14:35:30 +0100 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2023-02-13 08:32:40 +0000 |
commit | 7d339afdb919da3978ef92094f831fd06ea64250 (patch) | |
tree | 97843580b8ef749cb64a936c828f397da52387d8 /src | |
parent | bf35eea0cf838a3bb125f22d0b7a10c39cb621eb (diff) | |
download | qtwayland-7d339afdb919da3978ef92094f831fd06ea64250.tar.gz |
Disambiguate input method constants
They cause clashes in CMake Unity (Jumbo) builds.
Task-number: QTBUG-109394
Change-Id: I13b33c894818d8aebce763eaf6c961d806961a63
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
Reviewed-by: Amir Masoud Abdol <amir.abdol@qt.io>
(cherry picked from commit 6ec8ce9a06e5ccb16f5fc3a5f857425f3db87c80)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'src')
-rw-r--r-- | src/client/qwaylandtextinputv1.cpp | 4 | ||||
-rw-r--r-- | src/client/qwaylandtextinputv2.cpp | 4 | ||||
-rw-r--r-- | src/client/qwaylandtextinputv4.cpp | 8 |
3 files changed, 8 insertions, 8 deletions
diff --git a/src/client/qwaylandtextinputv1.cpp b/src/client/qwaylandtextinputv1.cpp index 52a3a13c..da8bbae7 100644 --- a/src/client/qwaylandtextinputv1.cpp +++ b/src/client/qwaylandtextinputv1.cpp @@ -26,7 +26,7 @@ namespace QtWaylandClient { namespace { -const Qt::InputMethodQueries supportedQueries = Qt::ImEnabled | +const Qt::InputMethodQueries supportedQueries1 = Qt::ImEnabled | Qt::ImSurroundingText | Qt::ImCursorPosition | Qt::ImAnchorPosition | @@ -92,7 +92,7 @@ void QWaylandTextInputv1::updateState(Qt::InputMethodQueries queries, uint32_t f if (!surface || (surface != m_surface)) return; - queries &= supportedQueries; + queries &= supportedQueries1; // Surrounding text, cursor and anchor positions are transferred together if ((queries & Qt::ImSurroundingText) || (queries & Qt::ImCursorPosition) || (queries & Qt::ImAnchorPosition)) diff --git a/src/client/qwaylandtextinputv2.cpp b/src/client/qwaylandtextinputv2.cpp index 4dec15d5..a799793e 100644 --- a/src/client/qwaylandtextinputv2.cpp +++ b/src/client/qwaylandtextinputv2.cpp @@ -27,7 +27,7 @@ namespace QtWaylandClient { namespace { -const Qt::InputMethodQueries supportedQueries = Qt::ImEnabled | +const Qt::InputMethodQueries supportedQueries2 = Qt::ImEnabled | Qt::ImSurroundingText | Qt::ImCursorPosition | Qt::ImAnchorPosition | @@ -98,7 +98,7 @@ void QWaylandTextInputv2::updateState(Qt::InputMethodQueries queries, uint32_t f if (!surface || (surface != m_surface)) return; - queries &= supportedQueries; + queries &= supportedQueries2; // Surrounding text, cursor and anchor positions are transferred together if ((queries & Qt::ImSurroundingText) || (queries & Qt::ImCursorPosition) || (queries & Qt::ImAnchorPosition)) diff --git a/src/client/qwaylandtextinputv4.cpp b/src/client/qwaylandtextinputv4.cpp index 4b3e6eb5..6cf01613 100644 --- a/src/client/qwaylandtextinputv4.cpp +++ b/src/client/qwaylandtextinputv4.cpp @@ -31,7 +31,7 @@ QWaylandTextInputv4::~QWaylandTextInputv4() } namespace { -const Qt::InputMethodQueries supportedQueries = Qt::ImEnabled | +const Qt::InputMethodQueries supportedQueries4 = Qt::ImEnabled | Qt::ImSurroundingText | Qt::ImCursorPosition | Qt::ImAnchorPosition | @@ -51,7 +51,7 @@ void QWaylandTextInputv4::zwp_text_input_v4_enter(struct ::wl_surface *surface) m_pendingDeleteAfterText = 0; enable(); - updateState(supportedQueries, update_state_enter); + updateState(supportedQueries4, update_state_enter); } void QWaylandTextInputv4::zwp_text_input_v4_leave(struct ::wl_surface *surface) @@ -177,7 +177,7 @@ void QWaylandTextInputv4::zwp_text_input_v4_done(uint32_t serial) QCoreApplication::sendEvent(focusObject, &event); if (serial == m_currentSerial) - updateState(supportedQueries, update_state_full); + updateState(supportedQueries4, update_state_full); } void QWaylandTextInputv4::reset() @@ -225,7 +225,7 @@ void QWaylandTextInputv4::updateState(Qt::InputMethodQueries queries, uint32_t f if (!surface || (surface != m_surface)) return; - queries &= supportedQueries; + queries &= supportedQueries4; bool needsCommit = false; QInputMethodQueryEvent event(queries); |