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

@ -41,25 +41,6 @@ bool AnalyticsWizardPage::validatePage()
return true;
}
bool AnalyticsWizardPage::isRequired()
{
if(BuildConfig.ANALYTICS_ID.isEmpty())
{
return false;
}
auto settings = MMC->settings();
auto analytics = MMC->analytics();
if (!settings->get("Analytics").toBool())
{
return false;
}
if (settings->get("AnalyticsSeen").toInt() < analytics->version())
{
return true;
}
return false;
}
void AnalyticsWizardPage::retranslate()
{
setTitle(tr("Analytics"));