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,
|
connect(mUI->mButtonHideInformation, &QPushButton::clicked,
|
||||||
this, &MainWindow::hideInformation);
|
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()) {
|
if (mSettings->value(SETTINGS_CHECK_FOR_UPDATES, false).toBool()) {
|
||||||
// Is there a new version?
|
// Is there a new version?
|
||||||
if (isCppcheckPremium()) {
|
if (isCppcheckPremium()) {
|
||||||
|
@ -1936,7 +1933,7 @@ static int getVersion(const QString& nameWithVersion) {
|
||||||
void MainWindow::replyFinished(QNetworkReply *reply) {
|
void MainWindow::replyFinished(QNetworkReply *reply) {
|
||||||
reply->deleteLater();
|
reply->deleteLater();
|
||||||
if (reply->error()) {
|
if (reply->error()) {
|
||||||
// TODO?
|
mUI->mLayoutInformation->deleteLater();
|
||||||
qDebug() << "Response: ERROR";
|
qDebug() << "Response: ERROR";
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1956,6 +1953,9 @@ void MainWindow::replyFinished(QNetworkReply *reply) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (!mUI->mLabelInformation->isVisible()) {
|
||||||
|
mUI->mLayoutInformation->deleteLater();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::hideInformation() {
|
void MainWindow::hideInformation() {
|
||||||
|
|
Loading…
Reference in New Issue