Browse Source

fix(ui): remove placeholder update UI

Auto-updates were disabled in 196529b8e8
Fix #5040
reviewable/pr5055/r1
Anthony Bilinski 7 years ago
parent
commit
cb0f26356d
No known key found for this signature in database
GPG Key ID: 2AA8E0DA1B31FB3C
  1. 11
      src/widget/form/settings/aboutform.cpp

11
src/widget/form/settings/aboutform.cpp

@ -53,10 +53,15 @@ AboutForm::AboutForm() @@ -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);
@ -165,7 +170,7 @@ AboutForm::~AboutForm() @@ -165,7 +170,7 @@ AboutForm::~AboutForm()
*/
void AboutForm::showUpdateProgress()
{
#ifdef AUTOUPDATE_ENABLED
#if AUTOUPDATE_ENABLED
QString version = AutoUpdater::getProgressVersion();
int value = AutoUpdater::getProgressValue();
@ -188,12 +193,16 @@ void AboutForm::showUpdateProgress() @@ -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
}
/**

Loading…
Cancel
Save