Commit 7aa3909b authored by Pino Toscano's avatar Pino Toscano
Browse files

usb: remove unused fields

Remove fields which are not filled, or possibly refer to old features in
specific OSes.
parent d339c583
......@@ -67,28 +67,17 @@ USBDevice::USBDevice(libusb_device *dev, struct libusb_device_descriptor &dev_de
_level(0),
_parent(0),
_port(libusb_get_port_number(dev)),
_count(0),
_device(libusb_get_device_address(dev)),
_channels(0),
_power(0),
_speed(convertLibusbSpeed(libusb_get_device_speed(dev))),
_bwTotal(0),
_bwUsed(0),
_bwPercent(0),
_bwIntr(0),
_bwIso(0),
_hasBW(false),
_verMajor(0),
_verMinor(0),
_class(dev_desc.bDeviceClass),
_sub(dev_desc.bDeviceSubClass),
_prot(dev_desc.bDeviceProtocol),
_maxPacketSize(dev_desc.bMaxPacketSize0),
_configs(0),
_vendorID(dev_desc.idVendor),
_prodID(dev_desc.idProduct),
_revMajor(0),
_revMinor(0) {
_prodID(dev_desc.idProduct) {
_devices.append(this);
if (!_db)
......@@ -219,9 +208,6 @@ QString USBDevice::dump() {
if (!pname.isEmpty())
p += QStringLiteral("<td>(") + pname +QStringLiteral(")</td>");
r += i18n("<tr><td><i>Product ID</i></td><td>0x%1</td></tr>", p);
r += ki18n("<tr><td><i>Revision</i></td><td>%1.%2</td></tr>")
.subs(_revMajor,0,16).subs(_revMinor,2,16,QChar::fromLatin1('0'))
.toString();
r += QLatin1String("<tr><td></td></tr>");
r += i18n("<tr><td><i>Speed</i></td><td>%1 Mbit/s</td></tr>", _speed);
......@@ -229,13 +215,6 @@ QString USBDevice::dump() {
r += i18n("<tr><td><i>Max. Packet Size</i></td><td>%1</td></tr>", _maxPacketSize);
r += QLatin1String("<tr><td></td></tr>");
if (_hasBW) {
r += i18n("<tr><td><i>Bandwidth</i></td><td>%1 of %2 (%3%)</td></tr>", _bwUsed, _bwTotal, _bwPercent);
r += i18n("<tr><td><i>Intr. requests</i></td><td>%1</td></tr>", _bwIntr);
r += i18n("<tr><td><i>Isochr. requests</i></td><td>%1</td></tr>", _bwIso);
r += QLatin1String("<tr><td></td></tr>");
}
r += QLatin1String("</table>");
return r;
......
......@@ -55,18 +55,14 @@ private:
static USBDB *_db;
int _bus, _level, _parent, _port, _count, _device, _channels, _power;
int _bus, _level, _parent, _port, _device, _channels;
float _speed;
QString _manufacturer, _product, _serial;
int _bwTotal, _bwUsed, _bwPercent, _bwIntr, _bwIso;
bool _hasBW;
unsigned int _verMajor, _verMinor, _class, _sub, _prot, _maxPacketSize;
unsigned int _verMajor, _verMinor, _class, _sub, _prot, _maxPacketSize, _configs;
QString _className;
unsigned int _vendorID, _prodID, _revMajor, _revMinor;
unsigned int _vendorID, _prodID;
void collectDataSys(libusb_device *dev);
};
......
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