Commit 49c5ef26 authored by Friedemann Kleint's avatar Friedemann Kleint
Browse files

Fixes: Use apply()/finish() of Designer settings page interface

RevBy: Thorbjorn
parent aa68db05
......@@ -39,8 +39,7 @@
using namespace Designer::Internal;
SettingsPage::SettingsPage(QDesignerOptionsPageInterface *designerPage) :
m_designerPage(designerPage),
m_applyOnFinish(false)
m_designerPage(designerPage)
{
}
......@@ -65,17 +64,15 @@ QString SettingsPage::trCategory() const
QWidget *SettingsPage::createPage(QWidget *parent)
{
m_applyOnFinish = false;
return m_designerPage->createPage(parent);
}
void SettingsPage::apply()
{
// FIXME: Since no cleanup should be done here, we can't call finish(true)
m_applyOnFinish = true;
m_designerPage->apply();
}
void SettingsPage::finish()
{
m_designerPage->finish(m_applyOnFinish);
m_designerPage->finish();
}
......@@ -58,13 +58,12 @@ public:
QString category() const;
QString trCategory() const;
QWidget *createPage(QWidget *parent);
void apply();
void finish();
virtual QWidget *createPage(QWidget *parent);
virtual void apply();
virtual void finish();
private:
QDesignerOptionsPageInterface *m_designerPage;
bool m_applyOnFinish;
};
} // namespace Internal
......
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