@@ -676,8 +676,7 @@ void MainWindow::repopulateAccountsMenu()
|
||||
|
||||
void MainWindow::updatesAllowedChanged(bool allowed)
|
||||
{
|
||||
if(!APPLICATION->updaterEnabled())
|
||||
{
|
||||
if (!APPLICATION->updaterEnabled()) {
|
||||
return;
|
||||
}
|
||||
ui->actionCheckUpdate->setEnabled(allowed);
|
||||
@@ -1209,8 +1208,7 @@ void MainWindow::refreshInstances()
|
||||
|
||||
void MainWindow::checkForUpdates()
|
||||
{
|
||||
if(APPLICATION->updaterEnabled())
|
||||
{
|
||||
if (APPLICATION->updaterEnabled()) {
|
||||
APPLICATION->triggerUpdateCheck();
|
||||
} else {
|
||||
qWarning() << "Updater not set up. Cannot check for updates.";
|
||||
|
||||
@@ -46,17 +46,17 @@ UpdateAvailableDialog::UpdateAvailableDialog(const QString& currentVersion,
|
||||
ui->releaseNotes->setHtml(releaseNotesHtml);
|
||||
ui->releaseNotes->setOpenExternalLinks(true);
|
||||
|
||||
connect(ui->skipButton, &QPushButton::clicked, this, [this](){
|
||||
connect(ui->skipButton, &QPushButton::clicked, this, [this]() {
|
||||
setResult(ResultCode::Skip);
|
||||
done(ResultCode::Skip);
|
||||
});
|
||||
|
||||
connect(ui->delayButton, &QPushButton::clicked, this, [this](){
|
||||
connect(ui->delayButton, &QPushButton::clicked, this, [this]() {
|
||||
setResult(ResultCode::DontInstall);
|
||||
done(ResultCode::DontInstall);
|
||||
});
|
||||
|
||||
connect(ui->installButton, &QPushButton::clicked, this, [this](){
|
||||
connect(ui->installButton, &QPushButton::clicked, this, [this]() {
|
||||
setResult(ResultCode::Install);
|
||||
done(ResultCode::Install);
|
||||
});
|
||||
|
||||
@@ -31,13 +31,12 @@ class UpdateAvailableDialog : public QDialog {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
|
||||
enum ResultCode {
|
||||
Install = 10,
|
||||
DontInstall = 11,
|
||||
Skip = 12,
|
||||
};
|
||||
|
||||
|
||||
explicit UpdateAvailableDialog(const QString& currentVersion,
|
||||
const QString& availableVersion,
|
||||
const QString& releaseNotes,
|
||||
|
||||
Reference in New Issue
Block a user