summaryrefslogtreecommitdiff
path: root/noncore/settings/aqpkg/datamgr.cpp
authordrw <drw>2003-01-04 19:52:22 (UTC)
committer drw <drw>2003-01-04 19:52:22 (UTC)
commit8b0f280e69a6c5b4c1caf4070085feaf0951380d (patch) (side-by-side diff)
treeee99aba03491199a28b862afd439a591d9a3de88 /noncore/settings/aqpkg/datamgr.cpp
parentd7474edcc4efccbf5d5fd4b8926739a597463242 (diff)
downloadopie-8b0f280e69a6c5b4c1caf4070085feaf0951380d.zip
opie-8b0f280e69a6c5b4c1caf4070085feaf0951380d.tar.gz
opie-8b0f280e69a6c5b4c1caf4070085feaf0951380d.tar.bz2
Delay initial load of ipkg info so app displays quicker, and add progress display for longer operations (such as loading packages for large feeds).
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
@@ -22,2 +22,5 @@ using namespace std;
#include <qpe/config.h>
+#include <qpe/qpeapplication.h>
+#else
+#include <qapplication.h>
#endif
@@ -32,2 +35,3 @@ QString DataManager::availableCategories = "";
DataManager::DataManager()
+ : QObject( 0x0, 0x0 )
{
@@ -167,5 +171,15 @@ 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
@@ -175,5 +189,5 @@ void DataManager :: reloadServerData( )
// 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 ) ) );