Fix testTextInputV3Interface
Put EnableEmitter in the anonymous namespace to avoid it to be linked to the wrong implementation.
This commit is contained in:
parent
a011fe74b2
commit
5475751c7b
2 changed files with 28 additions and 19 deletions
|
@ -10,10 +10,13 @@
|
||||||
|
|
||||||
namespace KWaylandServer
|
namespace KWaylandServer
|
||||||
{
|
{
|
||||||
static const quint32 s_version = 1;
|
|
||||||
|
namespace
|
||||||
|
{
|
||||||
|
const quint32 s_version = 1;
|
||||||
|
|
||||||
// helpers
|
// helpers
|
||||||
static TextInputContentHints convertContentHint(uint32_t hint)
|
TextInputContentHints convertContentHint(uint32_t hint)
|
||||||
{
|
{
|
||||||
const auto hints = zwp_text_input_v2_content_hint(hint);
|
const auto hints = zwp_text_input_v2_content_hint(hint);
|
||||||
TextInputContentHints ret = TextInputContentHint::None;
|
TextInputContentHints ret = TextInputContentHint::None;
|
||||||
|
@ -51,7 +54,7 @@ static TextInputContentHints convertContentHint(uint32_t hint)
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static TextInputContentPurpose convertContentPurpose(uint32_t purpose)
|
TextInputContentPurpose convertContentPurpose(uint32_t purpose)
|
||||||
{
|
{
|
||||||
const auto wlPurpose = QtWaylandServer::zwp_text_input_v2::content_purpose(purpose);
|
const auto wlPurpose = QtWaylandServer::zwp_text_input_v2::content_purpose(purpose);
|
||||||
|
|
||||||
|
@ -87,12 +90,6 @@ static TextInputContentPurpose convertContentPurpose(uint32_t purpose)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
TextInputManagerV2InterfacePrivate::TextInputManagerV2InterfacePrivate(TextInputManagerV2Interface *_q, Display *display)
|
|
||||||
: QtWaylandServer::zwp_text_input_manager_v2(*display, s_version)
|
|
||||||
, q(_q)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
class EnabledEmitter
|
class EnabledEmitter
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
@ -113,6 +110,14 @@ private:
|
||||||
const bool m_wasEnabled;
|
const bool m_wasEnabled;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
TextInputManagerV2InterfacePrivate::TextInputManagerV2InterfacePrivate(TextInputManagerV2Interface *_q, Display *display)
|
||||||
|
: QtWaylandServer::zwp_text_input_manager_v2(*display, s_version)
|
||||||
|
, q(_q)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
void TextInputManagerV2InterfacePrivate::zwp_text_input_manager_v2_destroy(Resource *resource)
|
void TextInputManagerV2InterfacePrivate::zwp_text_input_manager_v2_destroy(Resource *resource)
|
||||||
{
|
{
|
||||||
wl_resource_destroy(resource->handle);
|
wl_resource_destroy(resource->handle);
|
||||||
|
|
|
@ -12,9 +12,11 @@
|
||||||
|
|
||||||
namespace KWaylandServer
|
namespace KWaylandServer
|
||||||
{
|
{
|
||||||
static const quint32 s_version = 1;
|
namespace
|
||||||
|
{
|
||||||
|
const quint32 s_version = 1;
|
||||||
|
|
||||||
static TextInputContentHints convertContentHint(uint32_t hint)
|
TextInputContentHints convertContentHint(uint32_t hint)
|
||||||
{
|
{
|
||||||
const auto hints = zwp_text_input_v3_content_hint(hint);
|
const auto hints = zwp_text_input_v3_content_hint(hint);
|
||||||
TextInputContentHints ret = TextInputContentHint::None;
|
TextInputContentHints ret = TextInputContentHint::None;
|
||||||
|
@ -52,7 +54,7 @@ static TextInputContentHints convertContentHint(uint32_t hint)
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static TextInputContentPurpose convertContentPurpose(uint32_t purpose)
|
TextInputContentPurpose convertContentPurpose(uint32_t purpose)
|
||||||
{
|
{
|
||||||
const auto wlPurpose = QtWaylandServer::zwp_text_input_v3::content_purpose(purpose);
|
const auto wlPurpose = QtWaylandServer::zwp_text_input_v3::content_purpose(purpose);
|
||||||
|
|
||||||
|
@ -90,7 +92,7 @@ static TextInputContentPurpose convertContentPurpose(uint32_t purpose)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static TextInputChangeCause convertChangeCause(uint32_t cause)
|
TextInputChangeCause convertChangeCause(uint32_t cause)
|
||||||
{
|
{
|
||||||
const auto wlCause = QtWaylandServer::zwp_text_input_v3::change_cause(cause);
|
const auto wlCause = QtWaylandServer::zwp_text_input_v3::change_cause(cause);
|
||||||
switch (wlCause) {
|
switch (wlCause) {
|
||||||
|
@ -102,12 +104,6 @@ static TextInputChangeCause convertChangeCause(uint32_t cause)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
TextInputManagerV3InterfacePrivate::TextInputManagerV3InterfacePrivate(TextInputManagerV3Interface *_q, Display *display)
|
|
||||||
: QtWaylandServer::zwp_text_input_manager_v3(*display, s_version)
|
|
||||||
, q(_q)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
class EnabledEmitter
|
class EnabledEmitter
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
@ -128,6 +124,14 @@ private:
|
||||||
const bool m_wasEnabled;
|
const bool m_wasEnabled;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
TextInputManagerV3InterfacePrivate::TextInputManagerV3InterfacePrivate(TextInputManagerV3Interface *_q, Display *display)
|
||||||
|
: QtWaylandServer::zwp_text_input_manager_v3(*display, s_version)
|
||||||
|
, q(_q)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
void TextInputManagerV3InterfacePrivate::zwp_text_input_manager_v3_destroy(Resource *resource)
|
void TextInputManagerV3InterfacePrivate::zwp_text_input_manager_v3_destroy(Resource *resource)
|
||||||
{
|
{
|
||||||
wl_resource_destroy(resource->handle);
|
wl_resource_destroy(resource->handle);
|
||||||
|
|
Loading…
Reference in a new issue