mirror of
https://bitbucket.org/smil3y/kde-workspace.git
synced 2025-02-23 18:32:50 +00:00
kinfocenter: check parents one-level deeper from usbview module
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
0d8d78785c
commit
1013b7722f
2 changed files with 9 additions and 5 deletions
|
@ -11,7 +11,7 @@
|
|||
#include <QGroupBox>
|
||||
#include <QLayout>
|
||||
#include <QSplitter>
|
||||
#include <QtGui/QTextEdit>
|
||||
#include <QTextEdit>
|
||||
#include <QTimer>
|
||||
#include <QHBoxLayout>
|
||||
#include <QList>
|
||||
|
@ -20,12 +20,10 @@
|
|||
|
||||
#include <kaboutdata.h>
|
||||
#include <kdialog.h>
|
||||
|
||||
#include <KPluginFactory>
|
||||
#include <KPluginLoader>
|
||||
|
||||
#include "usbdevices.h"
|
||||
|
||||
#include "moc_kcmusb.cpp"
|
||||
|
||||
K_PLUGIN_FACTORY(USBFactory, registerPlugin<USBViewer>();)
|
||||
|
@ -173,4 +171,3 @@ void USBViewer::selectionChanged(QTreeWidgetItem *item) {
|
|||
}
|
||||
_details->clear();
|
||||
}
|
||||
|
||||
|
|
|
@ -173,7 +173,9 @@ bool USBDevice::init() {
|
|||
device->_maxPacketSize = libusbdevice.bMaxPacketSize0;
|
||||
device->_vendorID = libusbdevice.idVendor;
|
||||
device->_prodID = libusbdevice.idProduct;
|
||||
device->_serial = QString::number(libusbdevice.iSerialNumber);
|
||||
if (libusbdevice.iSerialNumber > 0) {
|
||||
device->_serial = QString::number(libusbdevice.iSerialNumber);
|
||||
}
|
||||
device->_ver = getVersion(libusbdevice.bcdUSB);
|
||||
device->_rev = getVersion(libusbdevice.bcdDevice);
|
||||
|
||||
|
@ -184,6 +186,11 @@ bool USBDevice::init() {
|
|||
if (libusbparent) {
|
||||
device->_parent = libusb_get_port_number(libusbparent);
|
||||
device->_level = 1;
|
||||
struct libusb_device *libusbparentparent = libusb_get_parent(libusbparent);
|
||||
if (libusbparentparent) {
|
||||
// device->_parent = libusb_get_port_number(libusbparentparent);
|
||||
device->_level = 2;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue