Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Plasma
KInfoCenter
Commits
f503070a
Commit
f503070a
authored
Apr 25, 2021
by
Pino Toscano
Browse files
usb: use uint16_t for vendor/product IDS
Match the types used by libusb.
parent
1d0ec918
Changes
3
Hide whitespace changes
Inline
Side-by-side
Modules/usbview/usbdb.cpp
View file @
f503070a
...
...
@@ -94,7 +94,7 @@ USBDB::USBDB() {
}
}
QString
USBDB
::
vendor
(
int
id
)
const
{
QString
USBDB
::
vendor
(
u
int
16_t
id
)
const
{
QString
s
=
_ids
.
value
(
QStringLiteral
(
"%1"
).
arg
(
id
));
if
(
id
!=
0
)
{
return
s
;
...
...
@@ -102,7 +102,7 @@ QString USBDB::vendor(int id) const {
return
QString
();
}
QString
USBDB
::
device
(
int
vendor
,
int
id
)
const
{
QString
USBDB
::
device
(
u
int
16_t
vendor
,
u
int
16_t
id
)
const
{
QString
s
=
_ids
.
value
(
QStringLiteral
(
"%1-%2"
).
arg
(
vendor
).
arg
(
id
));
if
((
id
!=
0
)
&&
(
vendor
!=
0
))
return
s
;
...
...
Modules/usbview/usbdb.h
View file @
f503070a
...
...
@@ -21,8 +21,8 @@ public:
USBDB
();
QString
vendor
(
int
id
)
const
;
QString
device
(
int
vendor
,
int
id
)
const
;
QString
vendor
(
u
int
16_t
id
)
const
;
QString
device
(
u
int
16_t
vendor
,
u
int
16_t
id
)
const
;
QString
cls
(
uint8_t
cls
)
const
;
QString
subclass
(
uint8_t
cls
,
uint8_t
sub
)
const
;
...
...
Modules/usbview/usbdevices.h
View file @
f503070a
...
...
@@ -64,7 +64,7 @@ private:
uint8_t
_class
,
_sub
,
_prot
;
unsigned
int
_maxPacketSize
;
u
nsigned
in
t
_vendorID
,
_prodID
;
u
int16_
t
_vendorID
,
_prodID
;
void
collectDataSys
(
libusb_device
*
dev
);
};
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment