Improvements on the behavior of the program updater(closes #1282):

1. Check for updates every hour
2. Don't check again for this session if the user chose to ignore the new version
3. Display a message if the user checked for updates via the menu item and there isn't one
4. Remove dead code
This commit is contained in:
sledgehammer999 2014-01-25 20:39:42 +02:00
parent 94df3f44d7
commit 4cbe3fd6f7
4 changed files with 25 additions and 80 deletions

View file

@ -41,7 +41,7 @@ class ProgramUpdater : public QObject
{
Q_OBJECT
public:
explicit ProgramUpdater(QObject *parent = 0);
explicit ProgramUpdater(QObject *parent = 0, bool invokedByUser = false);
~ProgramUpdater();
void checkForUpdates();
void updateProgram();
@ -52,17 +52,15 @@ protected:
protected slots:
void rssDownloadFinished(QNetworkReply* reply);
//void installUpdate(QString update_path);
//void saveUpdate(QNetworkReply* reply);
void setUpdateUrl(QString title);
signals:
void updateCheckFinished(bool update_available, QString version);
void updateInstallFinished(QString error);
void updateCheckFinished(bool update_available, QString version, bool invokedByUser);
private:
QString m_updateUrl;
QNetworkAccessManager *mp_manager;
bool m_invokedByUser;
};
#endif // PROGRAMUPDATER_H