Updater: Add "didn't check for updates" message. #2175

Don't show "Checking server..." when we are not.
This commit is contained in:
Christian Kamm 2014-09-17 11:41:04 +02:00
parent 6e42ee1bd4
commit ece11dc3d8
2 changed files with 7 additions and 2 deletions

View file

@ -83,8 +83,10 @@ QString OCUpdater::statusString() const
return tr("Could not check for new updates.");
case UpdateOnlyAvailableThroughSystem:
return tr("New version %1 available. Please use the system's update tool to install it.").arg(updateVersion);
case Unknown:
case CheckingServer:
return tr("Checking update server...");
case Unknown:
return tr("Update status is unknown: Did not check for new updates.");
case UpToDate:
// fall through
default:
@ -120,6 +122,8 @@ void OCUpdater::checkForUpdate()
connect(_timer, SIGNAL(timeout()), this, SLOT(slotTimedOut()));
_timer->start(30*1000);
connect(reply, SIGNAL(finished()), this, SLOT(slotVersionInfoArrived()));
setDownloadState(CheckingServer);
}
void OCUpdater::slotOpenUpdateUrl()

View file

@ -33,7 +33,8 @@ class OCUpdater : public QObject, public Updater
{
Q_OBJECT
public:
enum DownloadState { Unknown = 0, UpToDate, Downloading, DownloadComplete,
enum DownloadState { Unknown = 0, CheckingServer, UpToDate,
Downloading, DownloadComplete,
DownloadFailed, DownloadTimedOut,
UpdateOnlyAvailableThroughSystem };
explicit OCUpdater(const QUrl &url, QObject *parent = 0);