use new feature name xkbcommon_evdev -> xkbcommon

The xkbcommon configure logic was refactored in
qtbase/c3a963da1f9e7b1d37e63eedded61da4fbdaaf9a.
For more details see the relevant commit.

Change-Id: Ic1aa26846ab8266c589f6e92dc8b81aba36df58a
Reviewed-by: Johan Helsing <johan.helsing@qt.io>
This commit is contained in:
Gatis Paeglis 2018-11-19 16:32:12 +01:00
parent a3e23fe560
commit f1e49d9309
9 changed files with 32 additions and 32 deletions

View File

@ -15,8 +15,8 @@ use_gold_linker: CONFIG += no_linker_version_script
CONFIG -= precompile_header
CONFIG += link_pkgconfig wayland-scanner
qtConfig(xkbcommon-evdev): \
QMAKE_USE_PRIVATE += xkbcommon_evdev
qtConfig(xkbcommon): \
QMAKE_USE_PRIVATE += xkbcommon
QMAKE_USE += wayland-client

View File

@ -2,8 +2,8 @@ QT += gui-private waylandclient-private
CONFIG += wayland-scanner
QMAKE_USE += wayland-client
qtConfig(xkbcommon-evdev): \
QMAKE_USE_PRIVATE += xkbcommon_evdev
qtConfig(xkbcommon): \
QMAKE_USE_PRIVATE += xkbcommon
WAYLANDCLIENTSOURCES += \
../../../3rdparty/protocol/wayland.xml

View File

@ -3,8 +3,8 @@ CONFIG += wayland-scanner
QMAKE_USE += wayland-client
qtConfig(xkbcommon-evdev): \
QMAKE_USE += xkbcommon_evdev
qtConfig(xkbcommon): \
QMAKE_USE += xkbcommon
HEADERS += \
qwaylandxdgpopupv5_p.h \

View File

@ -2,8 +2,8 @@ QT += gui-private waylandclient-private
CONFIG += wayland-scanner
QMAKE_USE += wayland-client
qtConfig(xkbcommon-evdev): \
QMAKE_USE_PRIVATE += xkbcommon_evdev
qtConfig(xkbcommon): \
QMAKE_USE_PRIVATE += xkbcommon
WAYLANDCLIENTSOURCES += \
../../../3rdparty/protocol/xdg-shell-unstable-v6.xml

View File

@ -2,8 +2,8 @@ QT += gui-private waylandclient-private
CONFIG += wayland-scanner
QMAKE_USE += wayland-client
qtConfig(xkbcommon-evdev): \
QMAKE_USE_PRIVATE += xkbcommon_evdev
qtConfig(xkbcommon): \
QMAKE_USE_PRIVATE += xkbcommon
WAYLANDCLIENTSOURCES += \
../../../3rdparty/protocol/xdg-decoration-unstable-v1.xml \

View File

@ -70,7 +70,7 @@
#include <QtGui/QGuiApplication>
#if QT_CONFIG(xkbcommon_evdev)
#if QT_CONFIG(xkbcommon)
#include <xkbcommon/xkbcommon-compose.h>
#endif
@ -84,7 +84,7 @@ QWaylandInputDevice::Keyboard::Keyboard(QWaylandInputDevice *p)
connect(&mRepeatTimer, SIGNAL(timeout()), this, SLOT(repeatKey()));
}
#if QT_CONFIG(xkbcommon_evdev)
#if QT_CONFIG(xkbcommon)
bool QWaylandInputDevice::Keyboard::createDefaultKeyMap()
{
if (mXkbContext && mXkbMap && mXkbState) {
@ -156,7 +156,7 @@ void QWaylandInputDevice::Keyboard::releaseComposeState()
QWaylandInputDevice::Keyboard::~Keyboard()
{
#if QT_CONFIG(xkbcommon_evdev)
#if QT_CONFIG(xkbcommon)
releaseComposeState();
releaseKeyMap();
#endif
@ -344,7 +344,7 @@ Qt::KeyboardModifiers QWaylandInputDevice::Keyboard::modifiers() const
{
Qt::KeyboardModifiers ret = Qt::NoModifier;
#if QT_CONFIG(xkbcommon_evdev)
#if QT_CONFIG(xkbcommon)
if (!mXkbState)
return ret;
@ -625,7 +625,7 @@ void QWaylandInputDevice::Pointer::pointer_axis(uint32_t time, uint32_t axis, in
void QWaylandInputDevice::Keyboard::keyboard_keymap(uint32_t format, int32_t fd, uint32_t size)
{
#if QT_CONFIG(xkbcommon_evdev)
#if QT_CONFIG(xkbcommon)
if (format != WL_KEYBOARD_KEYMAP_FORMAT_XKB_V1) {
close(fd);
return;
@ -728,7 +728,7 @@ void QWaylandInputDevice::Keyboard::keyboard_key(uint32_t serial, uint32_t time,
if (isDown)
mParent->mQDisplay->setLastInputDevice(mParent, serial, window);
#if QT_CONFIG(xkbcommon_evdev)
#if QT_CONFIG(xkbcommon)
if (!createDefaultKeyMap()) {
return;
}
@ -771,7 +771,7 @@ void QWaylandInputDevice::Keyboard::keyboard_key(uint32_t serial, uint32_t time,
#endif
if (state == WL_KEYBOARD_KEY_STATE_PRESSED
#if QT_CONFIG(xkbcommon_evdev)
#if QT_CONFIG(xkbcommon)
&& xkb_keymap_key_repeats(mXkbMap, code)
#endif
) {
@ -779,7 +779,7 @@ void QWaylandInputDevice::Keyboard::keyboard_key(uint32_t serial, uint32_t time,
mRepeatCode = code;
mRepeatTime = time;
mRepeatText = text;
#if QT_CONFIG(xkbcommon_evdev)
#if QT_CONFIG(xkbcommon)
mRepeatSym = sym;
#endif
mRepeatTimer.setInterval(400);
@ -793,7 +793,7 @@ void QWaylandInputDevice::Keyboard::repeatKey()
{
mRepeatTimer.setInterval(25);
sendKey(mFocus->window(), mRepeatTime, QEvent::KeyRelease, mRepeatKey, modifiers(), mRepeatCode,
#if QT_CONFIG(xkbcommon_evdev)
#if QT_CONFIG(xkbcommon)
mRepeatSym, mNativeModifiers,
#else
0, 0,
@ -801,7 +801,7 @@ void QWaylandInputDevice::Keyboard::repeatKey()
mRepeatText, true);
sendKey(mFocus->window(), mRepeatTime, QEvent::KeyPress, mRepeatKey, modifiers(), mRepeatCode,
#if QT_CONFIG(xkbcommon_evdev)
#if QT_CONFIG(xkbcommon)
mRepeatSym, mNativeModifiers,
#else
0, 0,
@ -816,7 +816,7 @@ void QWaylandInputDevice::Keyboard::keyboard_modifiers(uint32_t serial,
uint32_t group)
{
Q_UNUSED(serial);
#if QT_CONFIG(xkbcommon_evdev)
#if QT_CONFIG(xkbcommon)
if (mXkbState)
xkb_state_update_mask(mXkbState,
mods_depressed, mods_latched, mods_locked,

View File

@ -65,7 +65,7 @@
#include <QtWaylandClient/private/qwayland-wayland.h>
#if QT_CONFIG(xkbcommon_evdev)
#if QT_CONFIG(xkbcommon)
#include <xkbcommon/xkbcommon.h>
#include <xkbcommon/xkbcommon-keysyms.h>
#endif
@ -77,7 +77,7 @@
struct wl_cursor_image;
#endif
#if QT_CONFIG(xkbcommon_evdev)
#if QT_CONFIG(xkbcommon)
struct xkb_compose_state;
struct xkb_compose_table;
#endif
@ -209,7 +209,7 @@ public:
QWaylandInputDevice *mParent = nullptr;
QPointer<QWaylandWindow> mFocus;
#if QT_CONFIG(xkbcommon_evdev)
#if QT_CONFIG(xkbcommon)
xkb_context *mXkbContext = nullptr;
xkb_keymap *mXkbMap = nullptr;
xkb_state *mXkbState = nullptr;
@ -222,7 +222,7 @@ public:
uint32_t mRepeatCode;
uint32_t mRepeatTime;
QString mRepeatText;
#if QT_CONFIG(xkbcommon_evdev)
#if QT_CONFIG(xkbcommon)
xkb_keysym_t mRepeatSym;
#endif
QTimer mRepeatTimer;
@ -233,7 +233,7 @@ private slots:
void repeatKey();
private:
#if QT_CONFIG(xkbcommon_evdev)
#if QT_CONFIG(xkbcommon)
bool createDefaultKeyMap();
void releaseKeyMap();
void createComposeState();

View File

@ -43,13 +43,13 @@
#include <QKeyEvent>
#include <QString>
#if QT_CONFIG(xkbcommon_evdev)
#if QT_CONFIG(xkbcommon)
#include <xkbcommon/xkbcommon-keysyms.h>
#endif
QT_BEGIN_NAMESPACE
#if QT_CONFIG(xkbcommon_evdev)
#if QT_CONFIG(xkbcommon)
static const uint32_t KeyTbl[] = {
XKB_KEY_Escape, Qt::Key_Escape,
XKB_KEY_Tab, Qt::Key_Tab,
@ -297,7 +297,7 @@ static xkb_keysym_t toKeysymFromTable(uint32_t key)
std::pair<int, QString> QWaylandXkb::keysymToQtKey(xkb_keysym_t keysym, Qt::KeyboardModifiers &modifiers)
{
#if QT_CONFIG(xkbcommon_evdev)
#if QT_CONFIG(xkbcommon)
QString text;
uint utf32 = xkb_keysym_to_utf32(keysym);
if (utf32)
@ -339,7 +339,7 @@ std::pair<int, QString> QWaylandXkb::keysymToQtKey(xkb_keysym_t keysym, Qt::Keyb
Qt::KeyboardModifiers QWaylandXkb::modifiers(struct xkb_state *state)
{
#if QT_CONFIG(xkbcommon_evdev)
#if QT_CONFIG(xkbcommon)
Qt::KeyboardModifiers modifiers = Qt::NoModifier;
xkb_state_component cstate = static_cast<xkb_state_component>(XKB_STATE_DEPRESSED | XKB_STATE_LATCHED | XKB_STATE_LOCKED);
@ -367,7 +367,7 @@ QEvent::Type QWaylandXkb::toQtEventType(uint32_t state)
QVector<xkb_keysym_t> QWaylandXkb::toKeysym(QKeyEvent *event)
{
#if QT_CONFIG(xkbcommon_evdev)
#if QT_CONFIG(xkbcommon)
QVector<xkb_keysym_t> keysyms;
if (event->key() >= Qt::Key_F1 && event->key() <= Qt::Key_F35) {
keysyms.append(XKB_KEY_F1 + (event->key() - Qt::Key_F1));

View File

@ -45,7 +45,7 @@
#include <Qt>
#include <QEvent>
#if QT_CONFIG(xkbcommon_evdev)
#if QT_CONFIG(xkbcommon)
#include <xkbcommon/xkbcommon.h>
#else
typedef quint32 xkb_keysym_t;