client: Fix variable names for QWaylandDisplay::GlobalHolder

After 5abc59a, wayland-text-input-v4-wip was broken.
In addition, mTextInputManagerv2 will be changed to
textInputManagerv2 as other protocols.

Change-Id: I5476a1bba579ef1d915959b3c3881cf80a56587d
Reviewed-by: David Edmundson <davidedmundson@kde.org>
This commit is contained in:
Inho Lee 2023-06-23 12:26:48 +02:00 committed by David Edmundson
parent f3919e9448
commit 44a9d21c65
2 changed files with 11 additions and 11 deletions

View File

@ -655,9 +655,9 @@ void QWaylandDisplay::registry_global(uint32_t id, const QString &interface, uin
qCDebug(lcQpaWayland) << "text input: register qt_text_input_method_manager_v1"; qCDebug(lcQpaWayland) << "text input: register qt_text_input_method_manager_v1";
if (mTextInputManagerIndex < INT_MAX) { if (mTextInputManagerIndex < INT_MAX) {
mGlobals.textInputManagerv1.reset(); mGlobals.textInputManagerv1.reset();
mGlobals.mTextInputManagerv2.reset(); mGlobals.textInputManagerv2.reset();
#if QT_WAYLAND_TEXT_INPUT_V4_WIP #if QT_WAYLAND_TEXT_INPUT_V4_WIP
mTextInputManagerv4.reset(); mGlobals.textInputManagerv4.reset();
#endif // QT_WAYLAND_TEXT_INPUT_V4_WIP #endif // QT_WAYLAND_TEXT_INPUT_V4_WIP
for (QWaylandInputDevice *inputDevice : std::as_const(mInputDevices)) for (QWaylandInputDevice *inputDevice : std::as_const(mInputDevices))
inputDevice->setTextInput(nullptr); inputDevice->setTextInput(nullptr);
@ -677,9 +677,9 @@ void QWaylandDisplay::registry_global(uint32_t id, const QString &interface, uin
qCDebug(lcQpaWayland) << "text input: register zwp_text_input_v1"; qCDebug(lcQpaWayland) << "text input: register zwp_text_input_v1";
if (mTextInputManagerIndex < INT_MAX) { if (mTextInputManagerIndex < INT_MAX) {
mGlobals.textInputMethodManager.reset(); mGlobals.textInputMethodManager.reset();
mGlobals.mTextInputManagerv2.reset(); mGlobals.textInputManagerv2.reset();
#if QT_WAYLAND_TEXT_INPUT_V4_WIP #if QT_WAYLAND_TEXT_INPUT_V4_WIP
mTextInputManagerv4.reset(); mGlobals.textInputManagerv4.reset();
#endif // QT_WAYLAND_TEXT_INPUT_V4_WIP #endif // QT_WAYLAND_TEXT_INPUT_V4_WIP
for (QWaylandInputDevice *inputDevice : std::as_const(mInputDevices)) for (QWaylandInputDevice *inputDevice : std::as_const(mInputDevices))
inputDevice->setTextInputMethod(nullptr); inputDevice->setTextInputMethod(nullptr);
@ -703,17 +703,17 @@ void QWaylandDisplay::registry_global(uint32_t id, const QString &interface, uin
mGlobals.textInputMethodManager.reset(); mGlobals.textInputMethodManager.reset();
mGlobals.textInputManagerv1.reset(); mGlobals.textInputManagerv1.reset();
#if QT_WAYLAND_TEXT_INPUT_V4_WIP #if QT_WAYLAND_TEXT_INPUT_V4_WIP
mTextInputManagerv4.reset(); mGlobals.textInputManagerv4.reset();
#endif // QT_WAYLAND_TEXT_INPUT_V4_WIP #endif // QT_WAYLAND_TEXT_INPUT_V4_WIP
for (QWaylandInputDevice *inputDevice : std::as_const(mInputDevices)) for (QWaylandInputDevice *inputDevice : std::as_const(mInputDevices))
inputDevice->setTextInputMethod(nullptr); inputDevice->setTextInputMethod(nullptr);
} }
mGlobals.mTextInputManagerv2.reset( mGlobals.textInputManagerv2.reset(
new QtWayland::zwp_text_input_manager_v2(registry, id, 1)); new QtWayland::zwp_text_input_manager_v2(registry, id, 1));
for (QWaylandInputDevice *inputDevice : std::as_const(mInputDevices)) for (QWaylandInputDevice *inputDevice : std::as_const(mInputDevices))
inputDevice->setTextInput(new QWaylandTextInputv2( inputDevice->setTextInput(new QWaylandTextInputv2(
this, mGlobals.mTextInputManagerv2->get_text_input(inputDevice->wl_seat()))); this, mGlobals.textInputManagerv2->get_text_input(inputDevice->wl_seat())));
mWaylandIntegration->reconfigureInputContext(); mWaylandIntegration->reconfigureInputContext();
mTextInputManagerIndex = mTextInputManagerList.indexOf(interface); mTextInputManagerIndex = mTextInputManagerList.indexOf(interface);
#if QT_WAYLAND_TEXT_INPUT_V4_WIP #if QT_WAYLAND_TEXT_INPUT_V4_WIP
@ -800,14 +800,14 @@ void QWaylandDisplay::registry_global_remove(uint32_t id)
mWaylandIntegration->reconfigureInputContext(); mWaylandIntegration->reconfigureInputContext();
} }
if (global.interface == QLatin1String(QtWayland::zwp_text_input_manager_v2::interface()->name)) { if (global.interface == QLatin1String(QtWayland::zwp_text_input_manager_v2::interface()->name)) {
mGlobals.mTextInputManagerv2.reset(); mGlobals.textInputManagerv2.reset();
for (QWaylandInputDevice *inputDevice : std::as_const(mInputDevices)) for (QWaylandInputDevice *inputDevice : std::as_const(mInputDevices))
inputDevice->setTextInput(nullptr); inputDevice->setTextInput(nullptr);
mWaylandIntegration->reconfigureInputContext(); mWaylandIntegration->reconfigureInputContext();
} }
#if QT_WAYLAND_TEXT_INPUT_V4_WIP #if QT_WAYLAND_TEXT_INPUT_V4_WIP
if (global.interface == QLatin1String(QtWayland::zwp_text_input_manager_v4::interface()->name)) { if (global.interface == QLatin1String(QtWayland::zwp_text_input_manager_v4::interface()->name)) {
mTextInputManagerv4.reset(); mGlobals.textInputManagerv4.reset();
for (QWaylandInputDevice *inputDevice : std::as_const(mInputDevices)) for (QWaylandInputDevice *inputDevice : std::as_const(mInputDevices))
inputDevice->setTextInput(nullptr); inputDevice->setTextInput(nullptr);
mWaylandIntegration->reconfigureInputContext(); mWaylandIntegration->reconfigureInputContext();

View File

@ -174,7 +174,7 @@ public:
} }
QtWayland::zwp_text_input_manager_v2 *textInputManagerv2() const QtWayland::zwp_text_input_manager_v2 *textInputManagerv2() const
{ {
return mGlobals.mTextInputManagerv2.get(); return mGlobals.textInputManagerv2.get();
} }
QtWayland::zwp_text_input_manager_v4 *textInputManagerv4() const QtWayland::zwp_text_input_manager_v4 *textInputManagerv4() const
{ {
@ -330,7 +330,7 @@ private:
#endif #endif
std::unique_ptr<QtWayland::qt_text_input_method_manager_v1> textInputMethodManager; std::unique_ptr<QtWayland::qt_text_input_method_manager_v1> textInputMethodManager;
std::unique_ptr<QtWayland::zwp_text_input_manager_v1> textInputManagerv1; std::unique_ptr<QtWayland::zwp_text_input_manager_v1> textInputManagerv1;
std::unique_ptr<QtWayland::zwp_text_input_manager_v2> mTextInputManagerv2; std::unique_ptr<QtWayland::zwp_text_input_manager_v2> textInputManagerv2;
std::unique_ptr<QtWayland::zwp_text_input_manager_v4> textInputManagerv4; std::unique_ptr<QtWayland::zwp_text_input_manager_v4> textInputManagerv4;
std::unique_ptr<QWaylandHardwareIntegration> hardwareIntegration; std::unique_ptr<QWaylandHardwareIntegration> hardwareIntegration;
std::unique_ptr<QWaylandXdgOutputManagerV1> xdgOutputManager; std::unique_ptr<QWaylandXdgOutputManagerV1> xdgOutputManager;