comparison ui/mainwindow.cpp @ 1292:87b3886aca69

(issue44) Also set available information when sw was dowloaded.
author Andre Heinecke <andre.heinecke@intevation.de>
date Mon, 29 Sep 2014 14:22:23 +0200
parents 4523d81eeafe
children fce8c122cbc4
comparison
equal deleted inserted replaced
1291:0eb723242536 1292:87b3886aca69
361 361
362 void MainWindow::installNewSW(const QString& fileName, const QDateTime& modDate) { 362 void MainWindow::installNewSW(const QString& fileName, const QDateTime& modDate) {
363 QFileInfo instProcInfo = QFileInfo(fileName); 363 QFileInfo instProcInfo = QFileInfo(fileName);
364 QString filePath = QDir::toNativeSeparators(instProcInfo.absoluteFilePath()); 364 QString filePath = QDir::toNativeSeparators(instProcInfo.absoluteFilePath());
365 365
366 /* Reset available information. */
367 mSettings.setValue("Software/available", fileName);
368 mSettings.setValue("Software/availableDate", modDate);
369
366 /* Copy the file to a temporary name for installation */ 370 /* Copy the file to a temporary name for installation */
367 filePath = getPrettyInstallerName(filePath); 371 filePath = getPrettyInstallerName(filePath);
368 372
369 if (filePath.isEmpty()) { 373 if (filePath.isEmpty()) {
370 qDebug() << "Failed to copy updater to temporary location."; 374 qDebug() << "Failed to copy updater to temporary location.";
565 569
566 void MainWindow::getLastModForCurrentVersion() 570 void MainWindow::getLastModForCurrentVersion()
567 { 571 {
568 QString softwareVersion = QString::fromLatin1(SW_RESOURCE_VERSION).arg( 572 QString softwareVersion = QString::fromLatin1(SW_RESOURCE_VERSION).arg(
569 QApplication::applicationVersion()); 573 QApplication::applicationVersion());
570 qDebug() << softwareVersion; 574 qDebug() << "Getting last modified date for: " << softwareVersion;
571 QString listResource = QString::fromLatin1(LIST_RESOURCE); 575 QString listResource = QString::fromLatin1(LIST_RESOURCE);
572 Downloader* downloader = new Downloader(this, 576 Downloader* downloader = new Downloader(this,
573 QString::fromLatin1(SERVER_URL), 577 QString::fromLatin1(SERVER_URL),
574 QByteArray(), 578 QByteArray(),
575 QDateTime::currentDateTime(), 579 QDateTime::currentDateTime(),

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