summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--noncore/net/opietooth/lib/manager.cc7
-rw-r--r--noncore/net/opietooth/manager/bluebase.cpp0
-rw-r--r--noncore/net/opietooth/manager/btconnectionitem.cpp1
3 files changed, 5 insertions, 3 deletions
diff --git a/noncore/net/opietooth/lib/manager.cc b/noncore/net/opietooth/lib/manager.cc
index 1281116..59ade6d 100644
--- a/noncore/net/opietooth/lib/manager.cc
+++ b/noncore/net/opietooth/lib/manager.cc
@@ -250,34 +250,35 @@ void Manager::searchConnections() {
this, SLOT(slotConnectionExited( OProcess*) ) );
connect(proc, SIGNAL(receivedStdout(OProcess*, char*, int) ),
this, SLOT(slotConnectionOutput(OProcess*, char*, int) ) );
*proc << "hcitool";
*proc << "con";
if (!proc->start(OProcess::NotifyOnExit, OProcess::AllOutput) ) {
ConnectionState::ValueList list;
emit connections( list );
delete proc;
}
}
-void Manager::slotConnectionExited( OProcess* /*proc*/ ) {
- qWarning("exited");
+void Manager::slotConnectionExited( OProcess* proc ) {
+ qWarning("<<<<<<<<<<<<<<<<<exited");
ConnectionState::ValueList list;
list = parseConnections( m_hcitoolCon );
emit connections(list );
+ delete proc;
}
void Manager::slotConnectionOutput(OProcess* proc, char* cha, int len) {
QCString str(cha, len );
m_hcitoolCon.append( str );
- delete proc;
+ //delete proc;
}
ConnectionState::ValueList Manager::parseConnections( const QString& out ) {
ConnectionState::ValueList list2;
QStringList list = QStringList::split('\n', out );
QStringList::Iterator it;
for (it = list.begin(); it != list.end(); ++it ) {
QString row = (*it).stripWhiteSpace();
QStringList value = QStringList::split(' ', row );
qWarning("0: %s", value[0].latin1() );
qWarning("1: %s", value[1].latin1() );
qWarning("2: %s", value[2].latin1() );
qWarning("3: %s", value[3].latin1() );
diff --git a/noncore/net/opietooth/manager/bluebase.cpp b/noncore/net/opietooth/manager/bluebase.cpp
index d3abb54..5c5f069 100644
--- a/noncore/net/opietooth/manager/bluebase.cpp
+++ b/noncore/net/opietooth/manager/bluebase.cpp
diff --git a/noncore/net/opietooth/manager/btconnectionitem.cpp b/noncore/net/opietooth/manager/btconnectionitem.cpp
index 6fb9c11..b57d1b3 100644
--- a/noncore/net/opietooth/manager/btconnectionitem.cpp
+++ b/noncore/net/opietooth/manager/btconnectionitem.cpp
@@ -1,21 +1,22 @@
#include <connection.h>
#include "btconnectionitem.h"
using namespace OpieTooth;
BTConnectionItem::BTConnectionItem( QListView* parent, const ConnectionState& con )
: BTListItem( parent ){
m_con = con;
setText(0, m_con.mac() );
+ setText(1, m_con.connectionMode() );
}
BTConnectionItem::~BTConnectionItem() {
}
QString BTConnectionItem::type() const {
return QString::fromLatin1("connection");
}
int BTConnectionItem::typeId() const {
return Connection;
}
ConnectionState BTConnectionItem::connection() const {
return m_con;