Commit f501c19e authored by Tim Jenssen's avatar Tim Jenssen

Wizards: factor out registerFieldName() for later use

Change-Id: Iaca37b246339b1329b7f3364e0686f25615e0e6b
Reviewed-by: Tobias Hunger's avatarTobias Hunger <tobias.hunger@qt.io>
parent ba1a6572
......@@ -55,14 +55,18 @@ void WizardPage::pageWasAdded()
void WizardPage::registerFieldWithName(const QString &name, QWidget *widget,
const char *property, const char *changedSignal)
{
registerFieldName(name);
registerField(name, widget, property, changedSignal);
}
void WizardPage::registerFieldName(const QString &name)
{
Wizard *wiz = qobject_cast<Wizard *>(wizard());
if (wiz)
wiz->registerFieldName(name);
else
m_toRegister.insert(name);
registerField(name, widget, property, changedSignal);
}
bool WizardPage::handleReject()
......
......@@ -54,6 +54,8 @@ signals:
void reportError(const QString &errorMessage);
private:
void registerFieldName(const QString &name);
QSet<QString> m_toRegister;
};
......
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