forked from qt-creator/qt-creator
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:
@@ -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;
|
||||
|
@@ -125,6 +125,8 @@ public:
|
||||
|
||||
Utils::MacroExpander *expander();
|
||||
|
||||
QVariant value(const QString &key);
|
||||
|
||||
private:
|
||||
static QHash<QString, FieldFactory> m_factories;
|
||||
|
||||
|
Reference in New Issue
Block a user