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:
parent
3748ca6bc8
commit
cb0f26356d
@ -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
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user