Commit 187d1f69 authored by Tobias Hunger's avatar Tobias Hunger
Browse files

JsonWizard: Make bool values easier to work with in string expandsion



Return an empty string for "false".

Change-Id: I54506fb3db5857786c0448b0c76114ad237ef555
Reviewed-by: default avatarDaniel Teske <daniel.teske@digia.com>
parent e62f3bc8
......@@ -46,8 +46,12 @@ JsonWizard::JsonWizard(QWidget *parent) :
{
m_expander.registerExtraResolver([this](const QString &name, QString *ret) -> bool {
QVariant v = value(name);
if (v.isValid())
*ret = v.toString();
if (v.isValid()) {
if (v.type() == QVariant::Bool)
*ret = v.toBool() ? QLatin1String("true") : QString();
else
*ret = v.toString();
}
return v.isValid();
});
}
......
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