Merge remote-tracking branch 'origin/5.4' into dev
Conflicts: .qmake.conf Change-Id: I65c8503cf632699129ebb6b4f01721b74be78def
This commit is contained in:
commit
726e478bbe
@ -63,7 +63,6 @@ public:
|
|||||||
QWaylandDisplay *display() const;
|
QWaylandDisplay *display() const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
struct wl_data_device_manager *m_data_device_manager;
|
|
||||||
QWaylandDisplay *m_display;
|
QWaylandDisplay *m_display;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -51,8 +51,8 @@ QT_BEGIN_NAMESPACE
|
|||||||
|
|
||||||
QWaylandExtendedOutput::QWaylandExtendedOutput(QWaylandScreen *screen, ::qt_extended_output *extended_output)
|
QWaylandExtendedOutput::QWaylandExtendedOutput(QWaylandScreen *screen, ::qt_extended_output *extended_output)
|
||||||
: QtWayland::qt_extended_output(extended_output)
|
: QtWayland::qt_extended_output(extended_output)
|
||||||
, m_screen(screen)
|
|
||||||
{
|
{
|
||||||
|
Q_UNUSED(screen);
|
||||||
}
|
}
|
||||||
|
|
||||||
QT_END_NAMESPACE
|
QT_END_NAMESPACE
|
||||||
|
@ -55,10 +55,6 @@ class Q_WAYLAND_CLIENT_EXPORT QWaylandExtendedOutput : public QtWayland::qt_exte
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
QWaylandExtendedOutput(QWaylandScreen *screen, struct ::qt_extended_output *extended_output);
|
QWaylandExtendedOutput(QWaylandScreen *screen, struct ::qt_extended_output *extended_output);
|
||||||
|
|
||||||
private:
|
|
||||||
|
|
||||||
QWaylandScreen *m_screen;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
QT_END_NAMESPACE
|
QT_END_NAMESPACE
|
||||||
|
@ -124,6 +124,18 @@ void QWaylandTextInput::updateState()
|
|||||||
commit_state(++m_serial);
|
commit_state(++m_serial);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void QWaylandTextInput::text_input_preedit_string(uint32_t serial, const QString &text, const QString &commit)
|
||||||
|
{
|
||||||
|
Q_UNUSED(serial)
|
||||||
|
if (!QGuiApplication::focusObject())
|
||||||
|
return;
|
||||||
|
|
||||||
|
m_commit = commit;
|
||||||
|
QList<QInputMethodEvent::Attribute> attributes;
|
||||||
|
QInputMethodEvent event(text, attributes);
|
||||||
|
QCoreApplication::sendEvent(QGuiApplication::focusObject(), &event);
|
||||||
|
}
|
||||||
|
|
||||||
void QWaylandTextInput::text_input_commit_string(uint32_t serial, const QString &text)
|
void QWaylandTextInput::text_input_commit_string(uint32_t serial, const QString &text)
|
||||||
{
|
{
|
||||||
Q_UNUSED(serial);
|
Q_UNUSED(serial);
|
||||||
@ -133,6 +145,8 @@ void QWaylandTextInput::text_input_commit_string(uint32_t serial, const QString
|
|||||||
QInputMethodEvent event;
|
QInputMethodEvent event;
|
||||||
event.setCommitString(text);
|
event.setCommitString(text);
|
||||||
QCoreApplication::sendEvent(QGuiApplication::focusObject(), &event);
|
QCoreApplication::sendEvent(QGuiApplication::focusObject(), &event);
|
||||||
|
|
||||||
|
m_commit = QString();
|
||||||
}
|
}
|
||||||
|
|
||||||
void QWaylandTextInput::text_input_enter(wl_surface *)
|
void QWaylandTextInput::text_input_enter(wl_surface *)
|
||||||
@ -143,6 +157,8 @@ void QWaylandTextInput::text_input_enter(wl_surface *)
|
|||||||
|
|
||||||
void QWaylandTextInput::text_input_leave()
|
void QWaylandTextInput::text_input_leave()
|
||||||
{
|
{
|
||||||
|
if (!m_commit.isEmpty())
|
||||||
|
text_input_commit_string(0, m_commit);
|
||||||
}
|
}
|
||||||
|
|
||||||
void QWaylandTextInput::text_input_keysym(uint32_t serial, uint32_t time, uint32_t sym, uint32_t state, uint32_t modifiers)
|
void QWaylandTextInput::text_input_keysym(uint32_t serial, uint32_t time, uint32_t sym, uint32_t state, uint32_t modifiers)
|
||||||
|
@ -60,6 +60,7 @@ public:
|
|||||||
void updateState();
|
void updateState();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
void text_input_preedit_string(uint32_t serial, const QString &text, const QString &commit) Q_DECL_OVERRIDE;
|
||||||
void text_input_commit_string(uint32_t serial, const QString &text) Q_DECL_OVERRIDE;
|
void text_input_commit_string(uint32_t serial, const QString &text) Q_DECL_OVERRIDE;
|
||||||
void text_input_enter(wl_surface *surface) Q_DECL_OVERRIDE;
|
void text_input_enter(wl_surface *surface) Q_DECL_OVERRIDE;
|
||||||
void text_input_leave() Q_DECL_OVERRIDE;
|
void text_input_leave() Q_DECL_OVERRIDE;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user