Wizards: let the page use wizard values

For example it will be used to get the
wizard directory to show icons in fields later.

Change-Id: I6a243a67a89e4a0133550a61b870d771147667f1
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
This commit is contained in:
Tim Jenssen
2017-09-19 11:59:56 +02:00
parent 9d40f81441
commit bb16ae7323
2 changed files with 12 additions and 0 deletions

View File

@@ -267,6 +267,16 @@ bool JsonFieldPage::Field::hasSpan()
return d->m_hasSpan;
}
QVariant JsonFieldPage::value(const QString &key)
{
QVariant v = property(key.toUtf8());
if (v.isValid())
return v;
auto w = qobject_cast<JsonWizard *>(wizard());
QTC_ASSERT(w, return QVariant());
return w->value(key);
}
QWidget *JsonFieldPage::Field::widget() const
{
return d->m_widget;

View File

@@ -125,6 +125,8 @@ public:
Utils::MacroExpander *expander();
QVariant value(const QString &key);
private:
static QHash<QString, FieldFactory> m_factories;