summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--noncore/net/opietooth/manager/bluebase.cpp16
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
@@ -42,8 +42,9 @@
#include <qlistview.h>
#include <qdir.h>
#include <qpopupmenu.h>
#include <qtimer.h>
+#include <qlist.h>
#include <qpe/qpeapplication.h>
#include <qpe/resource.h>
#include <qpe/config.h>
@@ -384,11 +385,22 @@ void BlueBase::addServicesToDevice( const QString& device, Services::ValueList s
if( it == m_deviceList.end() )
return;
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;
+
if (!servicesList.isEmpty() ) {
// add services
QMap<int, QString> list;
QMap<int, QString>::Iterator classIt;
@@ -404,9 +416,9 @@ void BlueBase::addServicesToDevice( const QString& device, Services::ValueList s
serviceItem->setPixmap( 0, m_iconLoader->serviceIcon( classId ) );
}
} else {
Services s1;
- s1.setServiceName( tr("no serives found") );
+ s1.setServiceName( tr("no services found") );
serviceItem = new BTServiceItem( deviceItem, s1 );
}
// now remove them from the list
m_deviceList.remove( it );
@@ -445,9 +457,9 @@ void BlueBase::addConnectedDevices( ConnectionState::ValueList connectionList )
connectionItem = new BTConnectionItem( ListView4 , con );
}
// recall connection search after some time
- QTimer::singleShot( 20000, this, SLOT( addConnectedDevices() ) );
+ QTimer::singleShot( 15000, this, SLOT( addConnectedDevices() ) );
}
/**