mirror of
https://github.com/PrismLauncher/PrismLauncher.git
synced 2026-06-29 09:59:59 +03:00
GH-1793 rearrange setup wizard logic to only check if they are needed once
This commit is contained in:
parent
ceb5fc6d75
commit
782384f185
10 changed files with 70 additions and 88 deletions
|
|
@ -197,24 +197,6 @@ bool JavaWizardPage::validatePage()
|
|||
return true;
|
||||
}
|
||||
|
||||
bool JavaWizardPage::isRequired()
|
||||
{
|
||||
QString currentHostName = QHostInfo::localHostName();
|
||||
QString oldHostName = MMC->settings()->get("LastHostname").toString();
|
||||
if (currentHostName != oldHostName)
|
||||
{
|
||||
MMC->settings()->set("LastHostname", currentHostName);
|
||||
return true;
|
||||
}
|
||||
QString currentJavaPath = MMC->settings()->get("JavaPath").toString();
|
||||
QString actualPath = FS::ResolveExecutable(currentJavaPath);
|
||||
if (actualPath.isNull())
|
||||
{
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
bool JavaWizardPage::wantsRefreshButton()
|
||||
{
|
||||
return true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue