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.cpp20
1 files changed, 17 insertions, 3 deletions
diff --git a/noncore/settings/aqpkg/datamgr.cpp b/noncore/settings/aqpkg/datamgr.cpp
index 0159a79..2c83e28 100644
--- a/noncore/settings/aqpkg/datamgr.cpp
+++ b/noncore/settings/aqpkg/datamgr.cpp
@@ -20,6 +20,9 @@ using namespace std;
20 20
21#ifdef QWS 21#ifdef QWS
22#include <qpe/config.h> 22#include <qpe/config.h>
23#include <qpe/qpeapplication.h>
24#else
25#include <qapplication.h>
23#endif 26#endif
24 27
25#include <stdio.h> 28#include <stdio.h>
@@ -30,6 +33,7 @@ using namespace std;
30 33
31QString DataManager::availableCategories = ""; 34QString DataManager::availableCategories = "";
32DataManager::DataManager() 35DataManager::DataManager()
36 : QObject( 0x0, 0x0 )
33{ 37{
34 activeServer = ""; 38 activeServer = "";
35 availableCategories = "#"; 39 availableCategories = "#";
@@ -165,17 +169,27 @@ void DataManager :: loadServers()
165 169
166void DataManager :: reloadServerData( ) 170void DataManager :: reloadServerData( )
167{ 171{
168 vector<Server>::iterator it = serverList.begin(); 172 emit progressSetSteps( serverList.size() );
173 emit progressSetMessage( tr( "Reading configuration..." ) );
174
175 vector<Server>::iterator it = serverList.begin();
176 QString serverName;
177 int i = 0;
169 for ( it = serverList.begin() ; it != serverList.end() ; ++it ) 178 for ( it = serverList.begin() ; it != serverList.end() ; ++it )
170 { 179 {
180 serverName = it->getServerName();
181 i++;
182 emit progressUpdate( i );
183 qApp->processEvents();
184
171 // Now we've read the config file in we need to read the servers 185 // Now we've read the config file in we need to read the servers
172 // The local server is a special case. This holds the contents of the 186 // The local server is a special case. This holds the contents of the
173 // status files the number of which depends on how many destinations 187 // status files the number of which depends on how many destinations
174 // we've set up 188 // we've set up
175 // The other servers files hold the contents of the server package list 189 // The other servers files hold the contents of the server package list
176 if ( it->getServerName() == LOCAL_SERVER ) 190 if ( serverName == LOCAL_SERVER )
177 it->readStatusFile( destList ); 191 it->readStatusFile( destList );
178 else if ( it->getServerName() == LOCAL_IPKGS ) 192 else if ( serverName == LOCAL_IPKGS )
179 it->readLocalIpks( &( *getServer( LOCAL_SERVER ) ) ); 193 it->readLocalIpks( &( *getServer( LOCAL_SERVER ) ) );
180 else 194 else
181 it->readPackageFile( &( *getServer( LOCAL_SERVER ) ) ); 195 it->readPackageFile( &( *getServer( LOCAL_SERVER ) ) );