Commit 3a33b0cc authored by Xaver Hugl's avatar Xaver Hugl
Browse files

Consider the tool type in TabletSeatV2Interface::toolByHardwareSerial

parent 9032c694
Pipeline #54306 passed with stage
in 7 minutes and 7 seconds
......@@ -810,10 +810,10 @@ TabletToolV2Interface *TabletSeatV2Interface::toolByHardwareId(quint64 hardwareI
return nullptr;
TabletToolV2Interface *TabletSeatV2Interface::toolByHardwareSerial(quint64 hardwareSerial) const
TabletToolV2Interface *TabletSeatV2Interface::toolByHardwareSerial(quint64 hardwareSerial, TabletToolV2Interface::Type type) const
for (TabletToolV2Interface *tool : qAsConst(d->m_tools)) {
if (tool->d->hardwareSerial() == hardwareSerial)
if (tool->d->hardwareSerial() == hardwareSerial && tool->d->m_type == type)
return tool;
return nullptr;
......@@ -260,7 +260,7 @@ public:
TabletToolV2Interface *addTool(TabletToolV2Interface::Type type, quint64 hardwareSerial, quint64 hardwareId, const QVector<TabletToolV2Interface::Capability> &capabilities);
TabletToolV2Interface *toolByHardwareId(quint64 hardwareId) const;
TabletToolV2Interface *toolByHardwareSerial(quint64 hardwareSerial) const;
TabletToolV2Interface *toolByHardwareSerial(quint64 hardwareSerial, TabletToolV2Interface::Type type) const;
TabletPadV2Interface *padByName(const QString &sysname) const;
void removeDevice(const QString &sysname);
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment