From 7d339afdb919da3978ef92094f831fd06ea64250 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Wed, 1 Feb 2023 14:35:30 +0100 Subject: Disambiguate input method constants They cause clashes in CMake Unity (Jumbo) builds. Task-number: QTBUG-109394 Change-Id: I13b33c894818d8aebce763eaf6c961d806961a63 Reviewed-by: Eskil Abrahamsen Blomfeldt Reviewed-by: Amir Masoud Abdol (cherry picked from commit 6ec8ce9a06e5ccb16f5fc3a5f857425f3db87c80) Reviewed-by: Qt Cherry-pick Bot --- src/client/qwaylandtextinputv1.cpp | 4 ++-- src/client/qwaylandtextinputv2.cpp | 4 ++-- 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); -- cgit v1.2.1