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)
|
if (QString(GIT_VERSION).indexOf(" ") > -1)
|
||||||
bodyUI->gitVersion->setOpenExternalLinks(false);
|
bodyUI->gitVersion->setOpenExternalLinks(false);
|
||||||
|
|
||||||
|
#if AUTOUPDATE_ENABLED
|
||||||
showUpdateProgress();
|
showUpdateProgress();
|
||||||
progressTimer->setInterval(500);
|
progressTimer->setInterval(500);
|
||||||
progressTimer->setSingleShot(false);
|
progressTimer->setSingleShot(false);
|
||||||
connect(progressTimer, &QTimer::timeout, this, &AboutForm::showUpdateProgress);
|
connect(progressTimer, &QTimer::timeout, this, &AboutForm::showUpdateProgress);
|
||||||
|
#else
|
||||||
|
bodyUI->updateProgress->setVisible(false);
|
||||||
|
bodyUI->updateText->setVisible(false);
|
||||||
|
#endif
|
||||||
|
|
||||||
eventsInit();
|
eventsInit();
|
||||||
Translator::registerHandler(std::bind(&AboutForm::retranslateUi, this), this);
|
Translator::registerHandler(std::bind(&AboutForm::retranslateUi, this), this);
|
||||||
@ -165,7 +170,7 @@ AboutForm::~AboutForm()
|
|||||||
*/
|
*/
|
||||||
void AboutForm::showUpdateProgress()
|
void AboutForm::showUpdateProgress()
|
||||||
{
|
{
|
||||||
#ifdef AUTOUPDATE_ENABLED
|
#if AUTOUPDATE_ENABLED
|
||||||
QString version = AutoUpdater::getProgressVersion();
|
QString version = AutoUpdater::getProgressVersion();
|
||||||
int value = AutoUpdater::getProgressValue();
|
int value = AutoUpdater::getProgressValue();
|
||||||
|
|
||||||
@ -188,12 +193,16 @@ void AboutForm::showUpdateProgress()
|
|||||||
|
|
||||||
void AboutForm::hideEvent(QHideEvent*)
|
void AboutForm::hideEvent(QHideEvent*)
|
||||||
{
|
{
|
||||||
|
#if AUTOUPDATE_ENABLED
|
||||||
progressTimer->stop();
|
progressTimer->stop();
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void AboutForm::showEvent(QShowEvent*)
|
void AboutForm::showEvent(QShowEvent*)
|
||||||
{
|
{
|
||||||
|
#if AUTOUPDATE_ENABLED
|
||||||
progressTimer->start();
|
progressTimer->start();
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user