Commit f68704f8 authored by Tobias Hunger's avatar Tobias Hunger

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: default avatarAlessandro Portale <alessandro.portale@theqtcompany.com>
parent f76b9b54
@if '%{Stateless}'
@if %{Stateless}
.pragma library
@endif
......
......@@ -29,8 +29,6 @@
"span": true,
"data":
{
"checkedValue": "yes",
"uncheckedValue": "",
"checked": false
}
}
......
......@@ -73,8 +73,6 @@
"type": "CheckBox",
"data":
{
"checkedValue": true,
"uncheckedValue": false,
"checked": false
}
}
......
......@@ -81,8 +81,6 @@
"type": "CheckBox",
"data":
{
"checkedValue": true,
"uncheckedValue": false,
"checked": true
}
},
......@@ -92,8 +90,6 @@
"type": "CheckBox",
"data":
{
"checkedValue": true,
"uncheckedValue": false,
"checked": true
}
}
......
......@@ -73,8 +73,6 @@
"type": "CheckBox",
"data":
{
"checkedValue": true,
"uncheckedValue": false,
"checked": false
}
}
......
......@@ -81,8 +81,6 @@
"type": "CheckBox",
"data":
{
"checkedValue": true,
"uncheckedValue": false,
"checked": true
}
}
......
......@@ -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.");
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment