1
0
mirror of https://github.com/qTox/qTox.git synced 2024-03-22 14:00:36 +08:00

fix(ui): remove placeholder update UI

Auto-updates were disabled in 196529b8e85539cb085c6af9db13f7a667758ef2
Fix #5040
This commit is contained in:
Anthony Bilinski 2018-04-04 23:27:37 -07:00
parent 3748ca6bc8
commit cb0f26356d
No known key found for this signature in database
GPG Key ID: 2AA8E0DA1B31FB3C

View File

@ -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()
*/
void AboutForm::showUpdateProgress()
{
#ifdef AUTOUPDATE_ENABLED
#if AUTOUPDATE_ENABLED
QString version = AutoUpdater::getProgressVersion();
int value = AutoUpdater::getProgressValue();
@ -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
}
/**