diff ui/mainwindow.cpp @ 17:c12825a651ed

Read out content-length and use this to skip existing files
author Andre Heinecke <aheinecke@intevation.de>
date Wed, 19 Feb 2014 14:22:26 +0000
parents 225a5ec20dad
children 9af6198deb8e
line wrap: on
line diff
--- a/ui/mainwindow.cpp	Wed Feb 19 10:45:29 2014 +0000
+++ b/ui/mainwindow.cpp	Wed Feb 19 14:22:26 2014 +0000
@@ -101,7 +101,6 @@
     mSettings.setValue("Software/available", fileName);
     mSettings.setValue("Software/availableDate", modDate);
 
-    qDebug() << "Settings value: " << mSettings.value("Software/available");
     mSettings.sync();
     showMessage();
 }
@@ -110,19 +109,12 @@
 {
     verifyAvailableData();
 
-    QDateTime listAvailableLastMod = mSettings.value("List/availableDate").toDateTime();
-    QDateTime swAvailableLastMod = mSettings.value("Software/availableDate").toDateTime();
-
-    if (!listAvailableLastMod.isValid()) {
-        listAvailableLastMod = mSettings.value("List/installedLastMod").toDateTime();
-    }
-
-    if (!swAvailableLastMod.isValid()) {
-        swAvailableLastMod = mSettings.value("List/installedLastMod").toDateTime();
-    }
+    QDateTime listInstalledLastMod = mSettings.value("List/installedDate").toDateTime();
+    QDateTime swInstalledLastMod = mSettings.value("Software/installedDate").toDateTime();
 
     Downloader* downloader = new Downloader(this, QString::fromLatin1("www.files.kolab.org"),
-            QByteArray(), swAvailableLastMod, listAvailableLastMod);
+            QByteArray(), swInstalledLastMod, listInstalledLastMod);
+
     connect(downloader, SIGNAL(newListAvailable(const QString&, const QDateTime&)),
             this, SLOT(handleNewList(const QString&, const QDateTime&)));
     connect(downloader, SIGNAL(newSoftwareAvailable(const QString&, const QDateTime&)),

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