GH-1793 rearrange setup wizard logic to only check if they are needed once

This commit is contained in:
Petr Mrázek
2017-01-21 18:18:53 +01:00
parent ceb5fc6d75
commit 782384f185
10 changed files with 70 additions and 88 deletions

View File

@ -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;