summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/opietooth/manager/bluebase.cpp31
1 files changed, 29 insertions, 2 deletions
diff --git a/noncore/net/opietooth/manager/bluebase.cpp b/noncore/net/opietooth/manager/bluebase.cpp
index d45fbe0..4d476ac 100644
--- a/noncore/net/opietooth/manager/bluebase.cpp
+++ b/noncore/net/opietooth/manager/bluebase.cpp
@@ -37,2 +37,3 @@
37#include <qlistview.h> 37#include <qlistview.h>
38#include <qdir.h>
38 39
@@ -140,2 +141,11 @@ namespace OpieTooth {
140 141
142 QList<RemoteDevice> *loadedDevices = new QList<RemoteDevice>;
143
144 Config deviceList( QDir::homeDirPath() + "/Settings/bluetooth/devicelist.conf", Config::File );
145
146
147 // RemoteDevice *currentDevice = RemoteDevice( , );
148 //loadedDevices->append( currentDevice );
149
150 addSearchedDevices( *loadedDevices );
141 } 151 }
@@ -143,3 +153,3 @@ namespace OpieTooth {
143 /* 153 /*
144 * Read the list of allready known devices 154 * Write the list of allready known devices
145 * 155 *
@@ -148,3 +158,19 @@ namespace OpieTooth {
148 158
159 QListViewItemIterator it( ListView2 );
160
161 // one top conf file with all decices (by mac adress)
162 Config deviceList( QDir::homeDirPath() + "/Settings/bluetooth/devicelist.conf", Config::File );
149 163
164 for ( ; it.current(); ++it ) {
165
166 // MAC adress as group
167 deviceList.setGroup( it.current()->text(1) );
168 deviceList.writeEntry("inList", 1);
169
170 // seperate config file for each device, to store more information in future.
171
172 Config conf( QDir::homeDirPath() + "/Settings/bluetooth/" + (it.current()->text(1)) + ".conf", Config::File );
173 conf.setGroup("Info");
174 conf.writeEntry("name", it.current()->text(0) );
175 }
150 } 176 }
@@ -167,3 +193,3 @@ namespace OpieTooth {
167 setInfo(); 193 setInfo();
168} 194 }
169 195
@@ -292,2 +318,3 @@ namespace OpieTooth {
292 BlueBase::~BlueBase(){ 318 BlueBase::~BlueBase(){
319 writeSavedDevices();
293 } 320 }