comparison ui/downloader.cpp @ 458:6fac87cadbd8

Only check for list if now sw is available
author Andre Heinecke <aheinecke@intevation.de>
date Wed, 23 Apr 2014 13:46:03 +0000
parents 20f539866fa8
children 34cc448409ec
comparison
equal deleted inserted replaced
457:c17c1da7108d 458:6fac87cadbd8
210 } 210 }
211 211
212 emit progress(tr("Connected"), 1, -1); 212 emit progress(tr("Connected"), 1, -1);
213 213
214 remoteModSW = getLastModifiedHeader(mResourceSW); 214 remoteModSW = getLastModifiedHeader(mResourceSW);
215 remoteModList = getLastModifiedHeader(mResourceList);
216 215
217 if (!remoteModSW.isValid() || !remoteModList.isValid()) { 216 if (!remoteModSW.isValid() || !remoteModList.isValid()) {
218 qDebug() << "Could not parse headers"; 217 qDebug() << "Could not parse headers";
219 return; 218 return;
220 } 219 }
236 if (!downloadFile(mResourceSW, fileName, MAX_SW_SIZE)) { 235 if (!downloadFile(mResourceSW, fileName, MAX_SW_SIZE)) {
237 return; 236 return;
238 } 237 }
239 238
240 emit newSoftwareAvailable(fileName, remoteModSW); 239 emit newSoftwareAvailable(fileName, remoteModSW);
241 } else if (!mLastModList.isValid() || remoteModList > mLastModList) { 240 return;
241 }
242
243 remoteModList = getLastModifiedHeader(mResourceList);
244
245 if (!mLastModList.isValid() || remoteModList > mLastModList) {
242 QString dataDirectory = getDataDirectory(); 246 QString dataDirectory = getDataDirectory();
243 247
244 if (dataDirectory.isEmpty()) { 248 if (dataDirectory.isEmpty()) {
245 qDebug() << "Failed to get data directory"; 249 qDebug() << "Failed to get data directory";
246 return; 250 return;

http://wald.intevation.org/projects/trustbridge/