diff --git a/src/declarative/pkupdates.h b/src/declarative/pkupdates.h --- a/src/declarative/pkupdates.h +++ b/src/declarative/pkupdates.h @@ -227,6 +227,7 @@ QString m_statusMessage; int m_percentage = 0; Activity m_activity = Idle; + bool m_lastCheckSuccessful = false; }; #endif // PLASMA_PK_UPDATES_H diff --git a/src/declarative/pkupdates.cpp b/src/declarative/pkupdates.cpp --- a/src/declarative/pkupdates.cpp +++ b/src/declarative/pkupdates.cpp @@ -134,6 +134,8 @@ return msg + "
" + i18n("(including %1)", extra.join(i18n(" and "))); } else if (!isNetworkOnline()) { return i18n("Your system is offline"); + } else if (!m_lastCheckSuccessful) { + return i18n("Checking for updates failed"); } return i18n("Your system is up to date"); @@ -345,7 +347,9 @@ "in" << runtime/1000 << "seconds"; if (trans->role() == PackageKit::Transaction::RoleRefreshCache) { - if (status == PackageKit::Transaction::ExitSuccess) { + m_lastCheckSuccessful = status == PackageKit::Transaction::ExitSuccess; + + if (m_lastCheckSuccessful) { qCDebug(PLASMA_PK_UPDATES) << "Cache transaction finished successfully"; // save the timestamp @@ -359,7 +363,9 @@ emit done(); } } else if (trans->role() == PackageKit::Transaction::RoleGetUpdates) { - if (status == PackageKit::Transaction::ExitSuccess) { + m_lastCheckSuccessful = status == PackageKit::Transaction::ExitSuccess; + + if (m_lastCheckSuccessful) { qCDebug(PLASMA_PK_UPDATES) << "Check updates transaction finished successfully"; const int upCount = count(); if (upCount > 0) {