mirror of
https://github.com/redstrate/Astra.git
synced 2025-05-13 21:07:46 +00:00
Fallback to the base game version when no version file is found
This commit is contained in:
parent
6f499927be
commit
9c7174c81f
2 changed files with 8 additions and 2 deletions
|
@ -288,6 +288,9 @@ QString Profile::bootVersion() const
|
||||||
QString Profile::baseGameVersion() const
|
QString Profile::baseGameVersion() const
|
||||||
{
|
{
|
||||||
Q_ASSERT(m_repositories.repositories_count >= 1);
|
Q_ASSERT(m_repositories.repositories_count >= 1);
|
||||||
|
if (m_repositories.repositories_count == 0 || m_repositories.repositories[0].version == nullptr) {
|
||||||
|
return QStringLiteral("2012.01.01.0000.0000");
|
||||||
|
}
|
||||||
return QString::fromLatin1(m_repositories.repositories[0].version);
|
return QString::fromLatin1(m_repositories.repositories[0].version);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -56,13 +56,16 @@ Kirigami.Page {
|
||||||
}
|
}
|
||||||
|
|
||||||
Kirigami.PromptDialog {
|
Kirigami.PromptDialog {
|
||||||
id: updateRequiredDialog
|
id: updateDialog
|
||||||
|
|
||||||
showCloseButton: false
|
showCloseButton: false
|
||||||
standardButtons: Kirigami.Dialog.Yes | Kirigami.Dialog.Cancel
|
standardButtons: Kirigami.Dialog.Yes | Kirigami.Dialog.Cancel
|
||||||
|
|
||||||
onAccepted: LauncherCore.updateDecided(true)
|
onAccepted: LauncherCore.updateDecided(true)
|
||||||
onRejected: LauncherCore.updateDecided(false)
|
onRejected: {
|
||||||
|
LauncherCore.updateDecided(false);
|
||||||
|
applicationWindow().checkSetup();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Connections {
|
Connections {
|
||||||
|
|
Loading…
Add table
Reference in a new issue