summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (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
@@ -44,4 +44,5 @@
#include <qpopupmenu.h>
#include <qtimer.h>
+#include <qlist.h>
#include <qpe/qpeapplication.h>
@@ -386,6 +387,17 @@ void BlueBase::addServicesToDevice( const QString& device, Services::ValueList s
deviceItem = it.data();
+ // remove previous entries
+ QList<QListViewItem> tempList;
+ tempList.setAutoDelete( true );
+ QListViewItem * child = deviceItem->firstChild();
+ while( child ) {
+ tempList.append( child );
+ child = child->nextSibling();
+ }
+ tempList.clear();
+
QValueList<OpieTooth::Services>::Iterator it2;
- BTServiceItem * serviceItem;
+ BTServiceItem* serviceItem;
+
if (!servicesList.isEmpty() ) {
@@ -394,5 +406,5 @@ void BlueBase::addServicesToDevice( const QString& device, Services::ValueList s
QMap<int, QString>::Iterator classIt;
for( it2 = servicesList.begin(); it2 != servicesList.end(); ++it2 ) {
- serviceItem = new BTServiceItem( deviceItem , (*it2) );
+ serviceItem = new BTServiceItem( deviceItem, (*it2) );
list = (*it2).classIdList();
classIt = list.begin();
@@ -406,5 +418,5 @@ void BlueBase::addServicesToDevice( const QString& device, Services::ValueList s
} else {
Services s1;
- s1.setServiceName( tr("no serives found") );
+ s1.setServiceName( tr("no services found") );
serviceItem = new BTServiceItem( deviceItem, s1 );
}
@@ -447,5 +459,5 @@ void BlueBase::addConnectedDevices( ConnectionState::ValueList connectionList )
// recall connection search after some time
- QTimer::singleShot( 20000, this, SLOT( addConnectedDevices() ) );
+ QTimer::singleShot( 15000, this, SLOT( addConnectedDevices() ) );
}