JsonWizard: Add option to put evaluated expressions into options

This is necessary to allow for constants that are not re-evaluated all
the time.

Change-Id: I4aec9d71aeae1a25ffa97eac177dd9c6fc6a90ca
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
This commit is contained in:
Tobias Hunger
2015-12-07 11:27:07 +01:00
parent 480f40c038
commit 56a9b93a28
4 changed files with 37 additions and 12 deletions

View File

@@ -395,8 +395,11 @@ Utils::Wizard *JsonWizardFactory::runWizardImpl(const QString &path, QWidget *pa
wizard->setValue(QStringLiteral("category"), category());
wizard->setValue(QStringLiteral("id"), id().toString());
foreach (const JsonWizard::OptionDefinition &od, m_options)
wizard->setValue(od.key, od.value);
Utils::MacroExpander *expander = wizard->expander();
foreach (const JsonWizard::OptionDefinition &od, m_options) {
if (od.condition(*expander))
wizard->setValue(od.key(), od.value(*expander));
}
bool havePage = false;
foreach (const Page &data, m_pages) {