[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [muon] updater: Even if there are updates, if there hasn't been a check in a week,
From: Jonathan Thomas <echidnaman () kubuntu ! org>
Date: 2013-06-17 14:15:54
Message-ID: 20130617141554.9F765A605A () git ! kde ! org
[Download RAW message or body]
Git commit 7e1aaaaf0706bb62a55b24a455783a119c369c33 by Jonathan Thomas.
Committed on 17/06/2013 at 16:15.
Pushed by jmthomas into branch 'master'.
Even if there are updates, if there hasn't been a check in a week, show the "please \
check for updates" screen rather than the package view.
M +6 -6 updater/UpdaterWidget.cpp
http://commits.kde.org/muon/7e1aaaaf0706bb62a55b24a455783a119c369c33
diff --git a/updater/UpdaterWidget.cpp b/updater/UpdaterWidget.cpp
index 81875b3..498984d 100644
--- a/updater/UpdaterWidget.cpp
+++ b/updater/UpdaterWidget.cpp
@@ -203,9 +203,13 @@ void UpdaterWidget::markAllPackagesForUpgrade()
void UpdaterWidget::checkUpToDate()
{
- if(!m_updatesBackends->hasUpdates()) {
+ QDateTime lastUpdate = m_updatesBackends->lastUpdate();
+ qint64 msecSinceUpdate = lastUpdate.msecsTo(QDateTime::currentDateTime());
+ qint64 day = 1000 * 60 * 60 * 24;
+ qint64 week = 1000 * 60 * 60 * 24 * 7;
+
+ if(!m_updatesBackends->hasUpdates() || msecSinceUpdate > week) {
setCurrentIndex(1);
- QDateTime lastUpdate = m_updatesBackends->lastUpdate();
// Unknown time since last update
if (!lastUpdate.isValid()) {
@@ -217,10 +221,6 @@ void UpdaterWidget::checkUpToDate()
return;
}
- qint64 msecSinceUpdate = lastUpdate.msecsTo(QDateTime::currentDateTime());
- qint64 day = 1000 * 60 * 60 * 24;
- qint64 week = 1000 * 60 * 60 * 24 * 7;
-
if (msecSinceUpdate < day) {
m_ui->updateStatusIcon->setPixmap(KIcon("security-high").pixmap(128, \
128));
m_ui->notifyTitle->setText(i18nc("@info", "The software on this computer \
is up to date."));
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic