TabletDatabase: Add a version of `lookupTablet` which requires companyId
ClosedPublic

Authored by jgerecke on May 1 2018, 7:34 PM.

Details

Summary

The existing Wacom::TabletDatabase::lookupTablet function does not require
a companyId and so may provide an unexpected match when provided with the
tabletId of a non-Wacom tablet which has the same ID as a Wacom tablet, or
the tablet ID of a Wacom tablet which isn't in the Wacom database but matches
a non-Wacom tablet. To allow for a more reliable match, this commit adds a
version of the lookupTablet function which requires a match on both the
provided companyID and the tabletID.

The first user of this new function is testlibwacomdata.cpp which needs to
accurately look up tablet data for comparison across the built-in and
libwacom databases.

Diff Detail

Repository
R530 Wacom tablet support
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
jgerecke requested review of this revision.May 1 2018, 7:34 PM
jgerecke created this revision.
jgerecke updated this revision to Diff 33430.May 1 2018, 7:38 PM

Removed 2nd half of two-patch set

jgerecke edited the summary of this revision. (Show Details)May 1 2018, 7:39 PM
valeriymalov accepted this revision.Jun 3 2018, 12:57 PM

Looks good, works, thanks

This revision is now accepted and ready to land.Jun 3 2018, 12:57 PM
This revision was automatically updated to reflect the committed changes.