mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-29 18:13:55 -07:00
Check for client updates on startup (#5359)
This commit is contained in:
parent
e0829a75d2
commit
df9c5ae53c
13 changed files with 142 additions and 10 deletions
|
|
@ -192,6 +192,7 @@ SettingsCache::SettingsCache()
|
|||
|
||||
mbDownloadSpoilers = settings->value("personal/downloadspoilers", false).toBool();
|
||||
|
||||
checkUpdatesOnStartup = settings->value("personal/startupUpdateCheck", true).toBool();
|
||||
notifyAboutUpdates = settings->value("personal/updatenotification", true).toBool();
|
||||
notifyAboutNewVersion = settings->value("personal/newversionnotification", true).toBool();
|
||||
updateReleaseChannel = settings->value("personal/updatereleasechannel", 0).toInt();
|
||||
|
|
@ -1107,6 +1108,12 @@ void SettingsCache::setDefaultStartingLifeTotal(const int _defaultStartingLifeTo
|
|||
settings->setValue("game/defaultstartinglifetotal", defaultStartingLifeTotal);
|
||||
};
|
||||
|
||||
void SettingsCache::setCheckUpdatesOnStartup(QT_STATE_CHANGED_T value)
|
||||
{
|
||||
checkUpdatesOnStartup = static_cast<bool>(value);
|
||||
settings->setValue("personal/startupUpdateCheck", checkUpdatesOnStartup);
|
||||
}
|
||||
|
||||
void SettingsCache::setRememberGameSettings(const bool _rememberGameSettings)
|
||||
{
|
||||
rememberGameSettings = _rememberGameSettings;
|
||||
|
|
|
|||
|
|
@ -93,6 +93,7 @@ private:
|
|||
QString lang;
|
||||
QString deckPath, replaysPath, picsPath, redirectCachePath, customPicsPath, cardDatabasePath,
|
||||
customCardDatabasePath, themesPath, spoilerDatabasePath, tokenDatabasePath, themeName;
|
||||
bool checkUpdatesOnStartup;
|
||||
bool notifyAboutUpdates;
|
||||
bool notifyAboutNewVersion;
|
||||
bool showTipsOnStartup;
|
||||
|
|
@ -269,6 +270,10 @@ public:
|
|||
{
|
||||
return buddyConnectNotificationsEnabled;
|
||||
}
|
||||
bool getCheckUpdatesOnStartup() const
|
||||
{
|
||||
return checkUpdatesOnStartup;
|
||||
}
|
||||
bool getNotifyAboutUpdates() const
|
||||
{
|
||||
return notifyAboutUpdates;
|
||||
|
|
@ -704,6 +709,7 @@ public slots:
|
|||
void setCreateGameAsSpectator(const bool _createGameAsSpectator);
|
||||
void setDefaultStartingLifeTotal(const int _defaultStartingLifeTotal);
|
||||
void setRememberGameSettings(const bool _rememberGameSettings);
|
||||
void setCheckUpdatesOnStartup(QT_STATE_CHANGED_T value);
|
||||
void setNotifyAboutUpdate(QT_STATE_CHANGED_T _notifyaboutupdate);
|
||||
void setNotifyAboutNewVersion(QT_STATE_CHANGED_T _notifyaboutnewversion);
|
||||
void setUpdateReleaseChannel(int _updateReleaseChannel);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue