comparison ui/mainwindow.cpp @ 1230:05b938021a24

(issue38) A bit debug output for LTE handling.
author Andre Heinecke <andre.heinecke@intevation.de>
date Wed, 24 Sep 2014 15:26:26 +0200
parents a1e990947172
children dc1941e04373
comparison
equal deleted inserted replaced
1229:6154d554b3af 1230:05b938021a24
579 } 579 }
580 580
581 void MainWindow::downloaderError(const QString &message, SSLConnection::ErrorCode error) 581 void MainWindow::downloaderError(const QString &message, SSLConnection::ErrorCode error)
582 { 582 {
583 syslog_error_printf ("Failed to check for updates: %s", message.toUtf8().constData()); 583 syslog_error_printf ("Failed to check for updates: %s", message.toUtf8().constData());
584 qDebug() << "Downloader error: " << error;
584 if (error == SSLConnection::InvalidCertificate) { 585 if (error == SSLConnection::InvalidCertificate) {
585 handleLTE(lteInvalidCertificate); 586 handleLTE(lteInvalidCertificate);
586 } else { 587 } else {
587 handleLTE(lteNoConnection); 588 handleLTE(lteNoConnection);
588 } 589 }
1721 } 1722 }
1722 1723
1723 void MainWindow::handleLTE(LongTimeErrors lte, bool reset) 1724 void MainWindow::handleLTE(LongTimeErrors lte, bool reset)
1724 { 1725 {
1725 QString settingPrefix; 1726 QString settingPrefix;
1727 // qDebug() << "Handle LTE for " << lte << " Reset? : " << reset;
1726 switch (lte) { 1728 switch (lte) {
1727 case lteInvalidSoftware: 1729 case lteInvalidSoftware:
1728 settingPrefix = "LTE/invalidSW"; 1730 settingPrefix = "LTE/invalidSW";
1729 break; 1731 break;
1730 case lteInvalidList: 1732 case lteInvalidList:
1742 1744
1743 if (reset) { 1745 if (reset) {
1744 /* delete all values and be done */ 1746 /* delete all values and be done */
1745 mSettings.remove(settingPrefix + "_lastSaved"); 1747 mSettings.remove(settingPrefix + "_lastSaved");
1746 mSettings.remove(settingPrefix + "_count"); 1748 mSettings.remove(settingPrefix + "_count");
1747 mSettings.remove(settingPrefix + "_lastMsgShown"); 1749 mSettings.remove(settingPrefix + "_lastShown");
1748 return; 1750 return;
1749 } 1751 }
1750 1752
1751 QDateTime lastSaved = mSettings.value(settingPrefix + "_lastSaved").toDateTime(); 1753 QDateTime lastSaved = mSettings.value(settingPrefix + "_lastSaved").toDateTime();
1752 bool cnt_valid; 1754 bool cnt_valid;

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