GUI: some more tweaks for 'check for updates'
This commit is contained in:
parent
fba70683bc
commit
4634a72fe0
|
@ -258,9 +258,6 @@ MainWindow::MainWindow(TranslationHandler* th, QSettings* settings) :
|
|||
connect(mUI->mButtonHideInformation, &QPushButton::clicked,
|
||||
this, &MainWindow::hideInformation);
|
||||
|
||||
if (!mSettings->contains(SETTINGS_CHECK_FOR_UPDATES))
|
||||
mSettings->setValue(SETTINGS_CHECK_FOR_UPDATES, isCppcheckPremium());
|
||||
|
||||
if (mSettings->value(SETTINGS_CHECK_FOR_UPDATES, false).toBool()) {
|
||||
// Is there a new version?
|
||||
if (isCppcheckPremium()) {
|
||||
|
@ -1936,7 +1933,7 @@ static int getVersion(const QString& nameWithVersion) {
|
|||
void MainWindow::replyFinished(QNetworkReply *reply) {
|
||||
reply->deleteLater();
|
||||
if (reply->error()) {
|
||||
// TODO?
|
||||
mUI->mLayoutInformation->deleteLater();
|
||||
qDebug() << "Response: ERROR";
|
||||
return;
|
||||
}
|
||||
|
@ -1956,6 +1953,9 @@ void MainWindow::replyFinished(QNetworkReply *reply) {
|
|||
}
|
||||
}
|
||||
}
|
||||
if (!mUI->mLabelInformation->isVisible()) {
|
||||
mUI->mLayoutInformation->deleteLater();
|
||||
}
|
||||
}
|
||||
|
||||
void MainWindow::hideInformation() {
|
||||
|
|
Loading…
Reference in New Issue