summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/sysinfo/devicesinfo.cpp34
-rw-r--r--noncore/settings/sysinfo/devicesinfo.h2
2 files changed, 35 insertions, 1 deletions
diff --git a/noncore/settings/sysinfo/devicesinfo.cpp b/noncore/settings/sysinfo/devicesinfo.cpp
index 6508d3c..b463e43 100644
--- a/noncore/settings/sysinfo/devicesinfo.cpp
+++ b/noncore/settings/sysinfo/devicesinfo.cpp
@@ -258,2 +258,4 @@ void UsbCategory::populate()
258 int usbcount = 0; 258 int usbcount = 0;
259 UsbDevice* lastDev = 0;
260 UsbDevice* dev = 0;
259 while ( !usbinfo.atEnd() ) 261 while ( !usbinfo.atEnd() )
@@ -266,3 +268,19 @@ void UsbCategory::populate()
266 268
267 new UsbDevice( this, QString( "USB Device #%1" ).arg( usbcount++ ) ); 269 if ( !_level )
270 {
271 odebug << "adding new bus" << oendl;
272 dev = new UsbDevice( this, QString( "Generic USB Hub Device" ) );
273 lastDev = dev;
274 }
275 else
276 {
277 odebug << "adding new dev" << oendl;
278 dev = new UsbDevice( lastDev, QString( "Generic USB Hub Device" ) );
279 lastDev = dev;
280 }
281 }
282 else if ( line.startsWith( "S: Product" ) )
283 {
284 int dp = line.find( '=' );
285 dev->setText( 0, dp != -1 ? line.right( line.length()-1-dp ) : "<unknown>" );
268 } 286 }
@@ -283,2 +301,8 @@ Device::Device( Category* parent, const QString& name )
283 301
302Device::Device( Device* parent, const QString& name )
303 :OListViewItem( parent, name )
304{
305 devinfo = static_cast<QWidget*>( listView()->parent() );
306}
307
284Device::~Device() 308Device::~Device()
@@ -349,2 +373,10 @@ UsbDevice::UsbDevice( Category* parent, const QString& name )
349 373
374//=================================================================================================
375UsbDevice::UsbDevice( UsbDevice* parent, const QString& name )
376 :Device( parent, name )
377{
378 details = new QPushButton( name, devinfo );
379 details->hide();
380}
381
350UsbDevice::~UsbDevice() 382UsbDevice::~UsbDevice()
diff --git a/noncore/settings/sysinfo/devicesinfo.h b/noncore/settings/sysinfo/devicesinfo.h
index 586d204..c601a96 100644
--- a/noncore/settings/sysinfo/devicesinfo.h
+++ b/noncore/settings/sysinfo/devicesinfo.h
@@ -123,2 +123,3 @@ public:
123 Device( Category* parent, const QString& name ); 123 Device( Category* parent, const QString& name );
124 Device( Device* parent, const QString& name );
124 ~Device(); 125 ~Device();
@@ -168,2 +169,3 @@ public:
168 UsbDevice( Category* parent, const QString& name ); 169 UsbDevice( Category* parent, const QString& name );
170 UsbDevice( UsbDevice* parent, const QString& name );
169 ~UsbDevice(); 171 ~UsbDevice();