JsonWizard: Add separate method to get stringified values

Have value(...) return a QVariant that is never mangeled and add
a stringValue(...) method to retrieve stringified values. It is
way easier to see who needs what now.

Use this consistently in the JsonWizard and fix one place where
a QVariant was expected but a stringified version was returned.

Task-number: QTCREATORBUG-13486
Change-Id: I2c4e9188280940e529f0f60bcc18b9b7330865d1
Reviewed-by: Daniel Teske <daniel.teske@theqtcompany.com>
This commit is contained in:
Tobias Hunger
2014-11-21 14:06:19 +01:00
parent 78f1b24cd4
commit fa223ab65b
6 changed files with 38 additions and 31 deletions

View File

@@ -48,9 +48,9 @@ void JsonFilePage::initializePage()
return;
if (fileName().isEmpty())
setFileName(wiz->value(QLatin1String("InitialFileName")).toString());
setFileName(wiz->stringValue(QLatin1String("InitialFileName")));
if (path().isEmpty())
setPath(wiz->value(QLatin1String("InitialPath")).toString());
setPath(wiz->stringValue(QLatin1String("InitialPath")));
}
bool JsonFilePage::validatePage()