1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-18 17:40:48 +02:00

Final fixeds

This commit is contained in:
nordsoft 2022-08-26 22:26:56 +04:00
parent 5cb1097053
commit bb3c1879b7
3 changed files with 5 additions and 12 deletions

View File

@ -388,7 +388,7 @@
},
"updateConfigUrl" : {
"type" : "string",
"default" : "https://raw.githubusercontent.com/Nordsoft91/vcmi-autoupdate/main/autoUpdate.json"
"default" : "https://raw.githubusercontent.com/vcmi/vcmi-updates/master/vcmi-updates.json"
}
}
}

View File

@ -55,7 +55,7 @@ UpdateDialog::UpdateDialog(bool calledManually, QWidget *parent):
QNetworkReply *response = networkManager.get(QNetworkRequest(QUrl(url)));
QObject::connect(response, &QNetworkReply::finished, [&, response]{
connect(response, &QNetworkReply::finished, [&, response]{
response->deleteLater();
if(response->error() != QNetworkReply::NoError)
@ -87,7 +87,7 @@ void UpdateDialog::showUpdateDialog(bool isManually)
void UpdateDialog::on_checkOnStartup_stateChanged(int state)
{
Settings node = settings.write["launcher"]["updateOnStartup"];
node->Bool() = (state == 2 ? true : false);
node->Bool() = ui->checkOnStartup->isChecked();
}
void UpdateDialog::loadFromJson(const JsonNode & node)
@ -136,5 +136,5 @@ void UpdateDialog::loadFromJson(const JsonNode & node)
if(node["downloadLinks"][platformParameter].getType() == JsonNode::JsonType::DATA_STRING)
downloadLink = QString::fromStdString(node["downloadLinks"][platformParameter].String());
ui->downloadLink->setText(QString{"<a href=\"%1\">link</a>"}.arg(downloadLink));
ui->downloadLink->setText(QString{"<a href=\"%1\">Download page</a>"}.arg(downloadLink));
}

View File

@ -38,13 +38,6 @@
<property name="bottomMargin">
<number>12</number>
</property>
<item row="1" column="0">
<widget class="QLabel" name="downloadLabel">
<property name="text">
<string>Download:</string>
</property>
</widget>
</item>
<item row="0" column="0" colspan="5">
<widget class="QLabel" name="versionLabel">
<property name="sizePolicy">
@ -118,7 +111,7 @@
</sizepolicy>
</property>
<property name="text">
<string>not available</string>
<string/>
</property>
<property name="openExternalLinks">
<bool>true</bool>