author | andyq <andyq> | 2002-11-01 12:41:03 (UTC) |
---|---|---|
committer | andyq <andyq> | 2002-11-01 12:41:03 (UTC) |
commit | 0e34499726f7fa275363988ea466d13aab09f544 (patch) (unidiff) | |
tree | 20403963ae3c1b315c2d1fd4b23a33754289287c | |
parent | 4c5a56dbaddb3ac6b587c61a8ba6841987cf60fa (diff) | |
download | opie-0e34499726f7fa275363988ea466d13aab09f544.zip opie-0e34499726f7fa275363988ea466d13aab09f544.tar.gz opie-0e34499726f7fa275363988ea466d13aab09f544.tar.bz2 |
Fixed a bug where if a package was removed from the local view the packages didn't get relinked properly
-rw-r--r-- | noncore/settings/aqpkg/datamgr.cpp | 34 | ||||
-rw-r--r-- | noncore/settings/aqpkg/datamgr.h | 2 | ||||
-rw-r--r-- | noncore/settings/aqpkg/networkpkgmgr.cpp | 32 |
3 files changed, 36 insertions, 32 deletions
diff --git a/noncore/settings/aqpkg/datamgr.cpp b/noncore/settings/aqpkg/datamgr.cpp index 089c3e3..f342aff 100644 --- a/noncore/settings/aqpkg/datamgr.cpp +++ b/noncore/settings/aqpkg/datamgr.cpp | |||
@@ -137,22 +137,22 @@ void DataManager :: loadServers() | |||
137 | 137 | ||
138 | vector<Server>::iterator it; | 138 | reloadServerData( ); |
139 | for ( it = serverList.begin() ; it != serverList.end() ; ++it ) | ||
140 | reloadServerData( it->getServerName() ); | ||
141 | } | 139 | } |
142 | 140 | ||
143 | void DataManager :: reloadServerData( const char *serverName ) | 141 | void DataManager :: reloadServerData( ) |
144 | { | 142 | { |
145 | Server *s = getServer( serverName ); | 143 | vector<Server>::iterator it = serverList.begin(); |
146 | // Now we've read the config file in we need to read the servers | 144 | for ( it = serverList.begin() ; it != serverList.end() ; ++it ) |
147 | // The local server is a special case. This holds the contents of the | 145 | { |
148 | // status files the number of which depends on how many destinations | 146 | // Now we've read the config file in we need to read the servers |
149 | // we've set up | 147 | // The local server is a special case. This holds the contents of the |
150 | // The other servers files hold the contents of the server package list | 148 | // status files the number of which depends on how many destinations |
151 | if ( s->getServerName() == LOCAL_SERVER ) | 149 | // we've set up |
152 | s->readStatusFile( destList ); | 150 | // The other servers files hold the contents of the server package list |
153 | else if ( s->getServerName() == LOCAL_IPKGS ) | 151 | if ( it->getServerName() == LOCAL_SERVER ) |
154 | s->readLocalIpks( getServer( LOCAL_SERVER ) ); | 152 | it->readStatusFile( destList ); |
155 | else | 153 | else if ( it->getServerName() == LOCAL_IPKGS ) |
156 | s->readPackageFile( getServer( LOCAL_SERVER ) ); | 154 | it->readLocalIpks( getServer( LOCAL_SERVER ) ); |
157 | 155 | else | |
156 | it->readPackageFile( getServer( LOCAL_SERVER ) ); | ||
157 | } | ||
158 | } | 158 | } |
diff --git a/noncore/settings/aqpkg/datamgr.h b/noncore/settings/aqpkg/datamgr.h index eb802b5..8c6fb0d 100644 --- a/noncore/settings/aqpkg/datamgr.h +++ b/noncore/settings/aqpkg/datamgr.h | |||
@@ -51,3 +51,3 @@ public: | |||
51 | void loadServers(); | 51 | void loadServers(); |
52 | void reloadServerData( const char *sn ); | 52 | void reloadServerData( ); |
53 | 53 | ||
diff --git a/noncore/settings/aqpkg/networkpkgmgr.cpp b/noncore/settings/aqpkg/networkpkgmgr.cpp index 02e4e73..b5d7352 100644 --- a/noncore/settings/aqpkg/networkpkgmgr.cpp +++ b/noncore/settings/aqpkg/networkpkgmgr.cpp | |||
@@ -217,3 +217,2 @@ void NetworkPackageManager :: serverSelected( int ) | |||
217 | Server *s = dataMgr->getServer( serverName ); | 217 | Server *s = dataMgr->getServer( serverName ); |
218 | // dataMgr->setActiveServer( serverName ); | ||
219 | 218 | ||
@@ -223,2 +222,3 @@ void NetworkPackageManager :: serverSelected( int ) | |||
223 | { | 222 | { |
223 | |||
224 | QString text = ""; | 224 | QString text = ""; |
@@ -237,2 +237,3 @@ void NetworkPackageManager :: serverSelected( int ) | |||
237 | { | 237 | { |
238 | |||
238 | if ( compareVersions( it->getInstalledVersion(), it->getVersion() ) == 1 ) | 239 | if ( compareVersions( it->getInstalledVersion(), it->getVersion() ) == 1 ) |
@@ -266,7 +267,14 @@ void NetworkPackageManager :: serverSelected( int ) | |||
266 | 267 | ||
267 | new QCheckListItem( item, QString( "V. Available - " ) + it->getVersion() ); | 268 | if ( serverName == LOCAL_SERVER ) |
268 | if ( it->getLocalPackage() ) | 269 | { |
269 | { | 270 | new QCheckListItem( item, QString( "V. Installed - " ) + it->getVersion() ); |
270 | if ( it->isInstalled() ) | 271 | } |
271 | new QCheckListItem( item, QString( "V. Installed - " ) + it->getInstalledVersion() ); | 272 | else |
273 | { | ||
274 | new QCheckListItem( item, QString( "V. Available - " ) + it->getVersion() ); | ||
275 | if ( it->getLocalPackage() ) | ||
276 | { | ||
277 | if ( it->isInstalled() ) | ||
278 | new QCheckListItem( item, QString( "V. Installed - " ) + it->getInstalledVersion() ); | ||
279 | } | ||
272 | } | 280 | } |
@@ -319,3 +327,3 @@ void NetworkPackageManager :: updateServer() | |||
319 | // Reload data | 327 | // Reload data |
320 | dataMgr->reloadServerData( serversList->currentText() ); | 328 | dataMgr->reloadServerData(); |
321 | serverSelected(-1); | 329 | serverSelected(-1); |
@@ -348,5 +356,3 @@ void NetworkPackageManager :: upgradePackages() | |||
348 | // Reload data | 356 | // Reload data |
349 | dataMgr->reloadServerData( LOCAL_SERVER ); | 357 | dataMgr->reloadServerData(); |
350 | |||
351 | dataMgr->reloadServerData( serversList->currentText() ); | ||
352 | serverSelected(-1); | 358 | serverSelected(-1); |
@@ -438,3 +444,3 @@ void NetworkPackageManager :: downloadPackage() | |||
438 | 444 | ||
439 | dataMgr->reloadServerData( LOCAL_IPKGS ); | 445 | dataMgr->reloadServerData(); |
440 | serverSelected( -1 ); | 446 | serverSelected( -1 ); |
@@ -479,5 +485,3 @@ void NetworkPackageManager :: applyChanges() | |||
479 | // Reload data | 485 | // Reload data |
480 | dataMgr->reloadServerData( LOCAL_SERVER ); | 486 | dataMgr->reloadServerData(); |
481 | |||
482 | dataMgr->reloadServerData( serversList->currentText() ); | ||
483 | serverSelected(-1); | 487 | serverSelected(-1); |