summaryrefslogtreecommitdiff
path: root/noncore/settings/aqpkg/datamgr.cpp
Side-by-side diff
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
@@ -21,4 +21,7 @@ using namespace std;
#ifdef QWS
#include <qpe/config.h>
+#include <qpe/qpeapplication.h>
+#else
+#include <qapplication.h>
#endif
@@ -31,4 +34,5 @@ using namespace std;
QString DataManager::availableCategories = "";
DataManager::DataManager()
+ : QObject( 0x0, 0x0 )
{
activeServer = "";
@@ -166,7 +170,17 @@ void DataManager :: loadServers()
void DataManager :: reloadServerData( )
{
- vector<Server>::iterator it = serverList.begin();
+ emit progressSetSteps( serverList.size() );
+ emit progressSetMessage( tr( "Reading configuration..." ) );
+
+ vector<Server>::iterator it = serverList.begin();
+ QString serverName;
+ int i = 0;
for ( it = serverList.begin() ; it != serverList.end() ; ++it )
{
+ serverName = it->getServerName();
+ i++;
+ emit progressUpdate( i );
+ qApp->processEvents();
+
// Now we've read the config file in we need to read the servers
// The local server is a special case. This holds the contents of the
@@ -174,7 +188,7 @@ void DataManager :: reloadServerData( )
// we've set up
// The other servers files hold the contents of the server package list
- if ( it->getServerName() == LOCAL_SERVER )
+ if ( serverName == LOCAL_SERVER )
it->readStatusFile( destList );
- else if ( it->getServerName() == LOCAL_IPKGS )
+ else if ( serverName == LOCAL_IPKGS )
it->readLocalIpks( &( *getServer( LOCAL_SERVER ) ) );
else