summaryrefslogtreecommitdiff
path: root/noncore
Unidiff
Diffstat (limited to 'noncore') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/opietooth/lib/manager.cc2
-rw-r--r--noncore/net/opietooth/manager/btdeviceitem.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/noncore/net/opietooth/lib/manager.cc b/noncore/net/opietooth/lib/manager.cc
index 83100f1..83accf7 100644
--- a/noncore/net/opietooth/lib/manager.cc
+++ b/noncore/net/opietooth/lib/manager.cc
@@ -199,49 +199,49 @@ void Manager::slotHCIOut(OProcess* proc, char* ch, int len) {
199 QString string; 199 QString string;
200 if (it != m_devices.end() ) { 200 if (it != m_devices.end() ) {
201 odebug << "Manager: slotHCIOut " << oendl; 201 odebug << "Manager: slotHCIOut " << oendl;
202 string = it.data(); 202 string = it.data();
203 } 203 }
204 string.append( str ); 204 string.append( str );
205 205
206 m_devices.replace( proc->name(), string ); 206 m_devices.replace( proc->name(), string );
207} 207}
208RemoteDevice::ValueList Manager::parseHCIOutput(const QString& output ) { 208RemoteDevice::ValueList Manager::parseHCIOutput(const QString& output ) {
209 odebug << "Manager: parseHCI " << output.latin1() << oendl; 209 odebug << "Manager: parseHCI " << output.latin1() << oendl;
210 RemoteDevice::ValueList list; 210 RemoteDevice::ValueList list;
211 QStringList strList = QStringList::split('\n', output ); 211 QStringList strList = QStringList::split('\n', output );
212 QStringList::Iterator it; 212 QStringList::Iterator it;
213 QString str; 213 QString str;
214 for ( it = strList.begin(); it != strList.end(); ++it ) { 214 for ( it = strList.begin(); it != strList.end(); ++it ) {
215 str = (*it).stripWhiteSpace(); 215 str = (*it).stripWhiteSpace();
216 odebug << "Manager: OpieTooth " << str.latin1() << oendl; 216 odebug << "Manager: OpieTooth " << str.latin1() << oendl;
217 int pos = str.findRev(':' ); 217 int pos = str.findRev(':' );
218 if ( pos > 0 ) { 218 if ( pos > 0 ) {
219 QString mac = str.left(17 ); 219 QString mac = str.left(17 );
220 str.remove( 0, 17 ); 220 str.remove( 0, 17 );
221 odebug << "Manager: mac " << mac.latin1() << oendl; 221 odebug << "Manager: mac " << mac.latin1() << oendl;
222 odebug << "Manager: rest: " << str.latin1() << oendl; 222 odebug << "Manager: rest: " << str.latin1() << oendl;
223 RemoteDevice rem( mac , str.stripWhiteSpace() ); 223 RemoteDevice rem( mac , QString::fromUtf8(str.stripWhiteSpace()) );
224 list.append( rem ); 224 list.append( rem );
225 } 225 }
226 } 226 }
227 return list; 227 return list;
228} 228}
229 229
230////// hcitool cc and hcitool con 230////// hcitool cc and hcitool con
231 231
232/** 232/**
233 * Create it on the stack as don't care 233 * Create it on the stack as don't care
234 * so we don't need to care for it 234 * so we don't need to care for it
235 * cause hcitool gets reparented 235 * cause hcitool gets reparented
236 */ 236 */
237void Manager::connectTo( const QString& mac) { 237void Manager::connectTo( const QString& mac) {
238 OProcess proc; 238 OProcess proc;
239 proc << "hcitool"; 239 proc << "hcitool";
240 proc << "cc"; 240 proc << "cc";
241 proc << mac; 241 proc << mac;
242 proc.start(OProcess::DontCare); // the lib does not care at this point 242 proc.start(OProcess::DontCare); // the lib does not care at this point
243} 243}
244 244
245 245
246void Manager::searchConnections() { 246void Manager::searchConnections() {
247 odebug << "Manager: searchConnections()" << oendl; 247 odebug << "Manager: searchConnections()" << oendl;
diff --git a/noncore/net/opietooth/manager/btdeviceitem.cpp b/noncore/net/opietooth/manager/btdeviceitem.cpp
index c112463..fb1b1c1 100644
--- a/noncore/net/opietooth/manager/btdeviceitem.cpp
+++ b/noncore/net/opietooth/manager/btdeviceitem.cpp
@@ -1,30 +1,30 @@
1 1
2#include "btdeviceitem.h" 2#include "btdeviceitem.h"
3 3
4using namespace OpieTooth; 4using namespace OpieTooth;
5 5
6 6
7BTDeviceItem::BTDeviceItem( QListView* parent, const RemoteDevice& dev ) 7BTDeviceItem::BTDeviceItem( QListView* parent, const RemoteDevice& dev )
8 : BTListItem( parent ) { 8 : BTListItem( parent ) {
9 9
10 setText( 0, dev.name().utf8() ); 10 setText( 0, dev.name() );
11 m_device = dev; 11 m_device = dev;
12}; 12};
13BTDeviceItem::~BTDeviceItem() { 13BTDeviceItem::~BTDeviceItem() {
14// nothing I'm aware of 14// nothing I'm aware of
15} 15}
16RemoteDevice BTDeviceItem::remoteDevice() const { 16RemoteDevice BTDeviceItem::remoteDevice() const {
17 return m_device; 17 return m_device;
18} 18}
19QString BTDeviceItem::mac()const { 19QString BTDeviceItem::mac()const {
20 return m_device.mac(); 20 return m_device.mac();
21} 21}
22QString BTDeviceItem::name() const { 22QString BTDeviceItem::name() const {
23 return m_device.name(); 23 return m_device.name();
24} 24}
25QString BTDeviceItem::type() const { 25QString BTDeviceItem::type() const {
26 return QString::fromLatin1("device"); 26 return QString::fromLatin1("device");
27} 27}
28int BTDeviceItem::typeId() const { 28int BTDeviceItem::typeId() const {
29 return Device; 29 return Device;
30} 30}