Skip to content
This repository has been archived by the owner on Feb 12, 2023. It is now read-only.

Commit

Permalink
fix(ui): remove placeholder update UI
Browse files Browse the repository at this point in the history
Auto-updates were disabled in 196529b
Fix #5040
  • Loading branch information
anthonybilinski committed Apr 5, 2018
1 parent 3748ca6 commit cb0f263
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/widget/form/settings/aboutform.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,15 @@ AboutForm::AboutForm()
if (QString(GIT_VERSION).indexOf(" ") > -1)
bodyUI->gitVersion->setOpenExternalLinks(false);

#if AUTOUPDATE_ENABLED
showUpdateProgress();
progressTimer->setInterval(500);
progressTimer->setSingleShot(false);
connect(progressTimer, &QTimer::timeout, this, &AboutForm::showUpdateProgress);
#else
bodyUI->updateProgress->setVisible(false);
bodyUI->updateText->setVisible(false);
#endif

eventsInit();
Translator::registerHandler(std::bind(&AboutForm::retranslateUi, this), this);
Expand Down Expand Up @@ -165,7 +170,7 @@ AboutForm::~AboutForm()
*/
void AboutForm::showUpdateProgress()
{
#ifdef AUTOUPDATE_ENABLED
#if AUTOUPDATE_ENABLED
QString version = AutoUpdater::getProgressVersion();
int value = AutoUpdater::getProgressValue();

Expand All @@ -188,12 +193,16 @@ void AboutForm::showUpdateProgress()

void AboutForm::hideEvent(QHideEvent*)
{
#if AUTOUPDATE_ENABLED
progressTimer->stop();
#endif
}

void AboutForm::showEvent(QShowEvent*)
{
#if AUTOUPDATE_ENABLED
progressTimer->start();
#endif
}

/**
Expand Down

0 comments on commit cb0f263

Please sign in to comment.