-rw-r--r-- | noncore/net/opietooth/manager/bluebase.cpp | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/noncore/net/opietooth/manager/bluebase.cpp b/noncore/net/opietooth/manager/bluebase.cpp index 5c5f069..8b15c4f 100644 --- a/noncore/net/opietooth/manager/bluebase.cpp +++ b/noncore/net/opietooth/manager/bluebase.cpp | |||
@@ -44,4 +44,5 @@ | |||
44 | #include <qpopupmenu.h> | 44 | #include <qpopupmenu.h> |
45 | #include <qtimer.h> | 45 | #include <qtimer.h> |
46 | #include <qlist.h> | ||
46 | 47 | ||
47 | #include <qpe/qpeapplication.h> | 48 | #include <qpe/qpeapplication.h> |
@@ -386,7 +387,18 @@ void BlueBase::addServicesToDevice( const QString& device, Services::ValueList s | |||
386 | deviceItem = it.data(); | 387 | deviceItem = it.data(); |
387 | 388 | ||
389 | // remove previous entries | ||
390 | QList<QListViewItem> tempList; | ||
391 | tempList.setAutoDelete( true ); | ||
392 | QListViewItem * child = deviceItem->firstChild(); | ||
393 | while( child ) { | ||
394 | tempList.append( child ); | ||
395 | child = child->nextSibling(); | ||
396 | } | ||
397 | tempList.clear(); | ||
398 | |||
388 | QValueList<OpieTooth::Services>::Iterator it2; | 399 | QValueList<OpieTooth::Services>::Iterator it2; |
389 | BTServiceItem * serviceItem; | 400 | BTServiceItem * serviceItem; |
390 | 401 | ||
402 | |||
391 | if (!servicesList.isEmpty() ) { | 403 | if (!servicesList.isEmpty() ) { |
392 | // add services | 404 | // add services |
@@ -406,5 +418,5 @@ void BlueBase::addServicesToDevice( const QString& device, Services::ValueList s | |||
406 | } else { | 418 | } else { |
407 | Services s1; | 419 | Services s1; |
408 | s1.setServiceName( tr("no serives found") ); | 420 | s1.setServiceName( tr("no services found") ); |
409 | serviceItem = new BTServiceItem( deviceItem, s1 ); | 421 | serviceItem = new BTServiceItem( deviceItem, s1 ); |
410 | } | 422 | } |
@@ -447,5 +459,5 @@ void BlueBase::addConnectedDevices( ConnectionState::ValueList connectionList ) | |||
447 | 459 | ||
448 | // recall connection search after some time | 460 | // recall connection search after some time |
449 | QTimer::singleShot( 20000, this, SLOT( addConnectedDevices() ) ); | 461 | QTimer::singleShot( 15000, this, SLOT( addConnectedDevices() ) ); |
450 | } | 462 | } |
451 | 463 | ||