JsonWizard: Make checkbox default values true and false

That is closer to what a user expects than the "0" and "1" used
before.

Change-Id: I08b3a7b0361dd54b75ee7b2213b3d120fb016bf5
Reviewed-by: Alessandro Portale <alessandro.portale@theqtcompany.com>
This commit is contained in:
Tobias Hunger
2015-05-28 15:51:05 +02:00
parent f76b9b549c
commit f68704f8fd
7 changed files with 3 additions and 15 deletions

View File

@@ -617,8 +617,8 @@ bool JsonFieldPage::CheckBoxField::parseData(const QVariant &data, QString *erro
QVariantMap tmp = data.toMap();
m_checkedValue = tmp.value(QLatin1String("checkedValue"), QLatin1String("0")).toString();
m_uncheckedValue = tmp.value(QLatin1String("uncheckedValue"), QLatin1String("1")).toString();
m_checkedValue = tmp.value(QLatin1String("checkedValue"), true).toString();
m_uncheckedValue = tmp.value(QLatin1String("uncheckedValue"), false).toString();
if (m_checkedValue == m_uncheckedValue) {
*errorMessage= QCoreApplication::translate("ProjectExplorer::JsonFieldPage",
"CheckBox values for checked and unchecked state are identical.");