summaryrefslogtreecommitdiff
path: root/noncore/settings/aqpkg/datamgr.cpp
Unidiff
Diffstat (limited to 'noncore/settings/aqpkg/datamgr.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/aqpkg/datamgr.cpp19
1 files changed, 11 insertions, 8 deletions
diff --git a/noncore/settings/aqpkg/datamgr.cpp b/noncore/settings/aqpkg/datamgr.cpp
index cd0c78f..67f90a3 100644
--- a/noncore/settings/aqpkg/datamgr.cpp
+++ b/noncore/settings/aqpkg/datamgr.cpp
@@ -1,6 +1,6 @@
1/* 1/*
2                This file is part of the OPIE Project 2                This file is part of the OPIE Project
3 3
4 =. Copyright (c) 2002 Andy Qua <andy.qua@blueyonder.co.uk> 4 =. Copyright (c) 2002 Andy Qua <andy.qua@blueyonder.co.uk>
5             .=l. Dan Williams <drw@handhelds.org> 5             .=l. Dan Williams <drw@handhelds.org>
6           .>+-= 6           .>+-=
@@ -40,6 +40,9 @@
40#include "datamgr.h" 40#include "datamgr.h"
41#include "global.h" 41#include "global.h"
42 42
43QString LOCAL_SERVER;
44QString LOCAL_IPKGS;
45
43 46
44QString DataManager::availableCategories = ""; 47QString DataManager::availableCategories = "";
45DataManager::DataManager() 48DataManager::DataManager()
@@ -47,7 +50,7 @@ DataManager::DataManager()
47{ 50{
48 activeServer = ""; 51 activeServer = "";
49 availableCategories = "#"; 52 availableCategories = "#";
50 53
51 serverList.setAutoDelete( TRUE ); 54 serverList.setAutoDelete( TRUE );
52 destList.setAutoDelete( TRUE ); 55 destList.setAutoDelete( TRUE );
53} 56}
@@ -137,7 +140,7 @@ void DataManager :: loadServers()
137 linkToRoot = cfg.readBoolEntry( key, true ); 140 linkToRoot = cfg.readBoolEntry( key, true );
138#endif 141#endif
139 d->linkToRoot( linkToRoot ); 142 d->linkToRoot( linkToRoot );
140 143
141 destList.append( d ); 144 destList.append( d );
142 } 145 }
143 else if ( lineStr.startsWith( "option" ) || lineStr.startsWith( "#option" ) ) 146 else if ( lineStr.startsWith( "option" ) || lineStr.startsWith( "#option" ) )
@@ -180,7 +183,7 @@ void DataManager :: reloadServerData( )
180 183
181 QString serverName; 184 QString serverName;
182 int i = 0; 185 int i = 0;
183 186
184 Server *server; 187 Server *server;
185 QListIterator<Server> it( serverList ); 188 QListIterator<Server> it( serverList );
186 for ( ; it.current(); ++it ) 189 for ( ; it.current(); ++it )
@@ -190,7 +193,7 @@ void DataManager :: reloadServerData( )
190 i++; 193 i++;
191 emit progressUpdate( i ); 194 emit progressUpdate( i );
192 qApp->processEvents(); 195 qApp->processEvents();
193 196
194 // Now we've read the config file in we need to read the servers 197 // Now we've read the config file in we need to read the servers
195 // The local server is a special case. This holds the contents of the 198 // The local server is a special case. This holds the contents of the
196 // status files the number of which depends on how many destinations 199 // status files the number of which depends on how many destinations
@@ -201,7 +204,7 @@ void DataManager :: reloadServerData( )
201 else if ( serverName == LOCAL_IPKGS ) 204 else if ( serverName == LOCAL_IPKGS )
202 server->readLocalIpks( getServer( LOCAL_SERVER ) ); 205 server->readLocalIpks( getServer( LOCAL_SERVER ) );
203 else 206 else
204 server->readPackageFile( getServer( LOCAL_SERVER ) ); 207 server->readPackageFile( getServer( LOCAL_SERVER ) );
205 } 208 }
206} 209}
207 210
@@ -212,7 +215,7 @@ void DataManager :: writeOutIpkgConf()
212 { 215 {
213 return; 216 return;
214 } 217 }
215 218
216 QTextStream t( &f ); 219 QTextStream t( &f );
217/* 220/*
218 QString ipkg_conf = IPKG_CONF; 221 QString ipkg_conf = IPKG_CONF;
@@ -294,7 +297,7 @@ void DataManager :: writeOutIpkgConf()
294 297
295 t << "# Offline mode (for use in constructing flash images offline)\n"; 298 t << "# Offline mode (for use in constructing flash images offline)\n";
296 t << "#option offline_root target\n"; 299 t << "#option offline_root target\n";
297 300
298 f.close(); 301 f.close();
299} 302}
300 303