Remove Q_ASSERTs in TabletSeatV2Interface::{tabletByName,padByName}

This is needed to workaround a test failure in testButtonRebind. The
current issue is that tablet input is built around libinput backend,
but tests create fake input devices to represent tablets, so things such
as TabletV2Interface or TabletPadV2Interface are not registered as
expected.

In order to address the issue, input devices need to expose tablet
specific metadata in some way that doesn't require using libinput specific
apis. This will be done later.

Once the tests are fixed, we should be able to drop tablet null checks
in tabletToolEvent() functions.
wilder/Plasma/6.3
Vlad Zahorodnii 1 year ago
parent 4a01350f7e
commit a68faadbcb
  1. 2
      src/wayland/tablet_v2.cpp

@ -911,13 +911,11 @@ TabletToolV2Interface *TabletSeatV2Interface::toolByHardwareSerial(quint64 hardw
TabletV2Interface *TabletSeatV2Interface::tabletByName(const QString &name) const
{
Q_ASSERT(d->m_tablets.contains(name));
return d->m_tablets.value(name);
}
TabletPadV2Interface *TabletSeatV2Interface::padByName(const QString &name) const
{
Q_ASSERT(d->m_pads.contains(name));
return d->m_pads.value(name);
}

Loading…
Cancel
Save