summaryrefslogtreecommitdiff
path: root/noncore/net/opietooth/manager/bluebase.cpp
authorharlekin <harlekin>2003-03-06 23:17:10 (UTC)
committer harlekin <harlekin>2003-03-06 23:17:10 (UTC)
commit78a2773ef477a4ab7327350e5f1f6c07428ad8a4 (patch) (unidiff)
treed93e516530f66c0b15260c283d21481e92cfeb18 /noncore/net/opietooth/manager/bluebase.cpp
parent94a385f5f6868e930361dc8d25d3e87eacd20feb (diff)
downloadopie-78a2773ef477a4ab7327350e5f1f6c07428ad8a4.zip
opie-78a2773ef477a4ab7327350e5f1f6c07428ad8a4.tar.gz
opie-78a2773ef477a4ab7327350e5f1f6c07428ad8a4.tar.bz2
remove previous found services on rescan
Diffstat (limited to 'noncore/net/opietooth/manager/bluebase.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/opietooth/manager/bluebase.cpp20
1 files changed, 16 insertions, 4 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
@@ -45,2 +45,3 @@
45#include <qtimer.h> 45#include <qtimer.h>
46#include <qlist.h>
46 47
@@ -387,4 +388,15 @@ void BlueBase::addServicesToDevice( const QString& device, Services::ValueList s
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;
401
390 402
@@ -395,3 +407,3 @@ void BlueBase::addServicesToDevice( const QString& device, Services::ValueList s
395 for( it2 = servicesList.begin(); it2 != servicesList.end(); ++it2 ) { 407 for( it2 = servicesList.begin(); it2 != servicesList.end(); ++it2 ) {
396 serviceItem = new BTServiceItem( deviceItem , (*it2) ); 408 serviceItem = new BTServiceItem( deviceItem, (*it2) );
397 list = (*it2).classIdList(); 409 list = (*it2).classIdList();
@@ -407,3 +419,3 @@ void BlueBase::addServicesToDevice( const QString& device, Services::ValueList s
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 );
@@ -448,3 +460,3 @@ void BlueBase::addConnectedDevices( ConnectionState::ValueList connectionList )
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}