Commit 2319f57c authored by Jarek Kobus's avatar Jarek Kobus

The constructor of Wizard takes now WindowFlags, get rid of QScopedPointer

parent b1aae1b6
......@@ -290,8 +290,8 @@ public:
WizardProgress *m_wizardProgress;
};
Wizard::Wizard(QWidget *parent) :
QWizard(parent), d_ptr(new WizardPrivate)
Wizard::Wizard(QWidget *parent, Qt::WindowFlags flags) :
QWizard(parent, flags), d_ptr(new WizardPrivate)
{
d_ptr->q_ptr = this;
d_ptr->m_wizardProgress = new WizardProgress(this);
......@@ -301,6 +301,11 @@ Wizard::Wizard(QWidget *parent) :
setSideWidget(new LinearProgressWidget(d_ptr->m_wizardProgress, this));
}
Wizard::~Wizard()
{
delete d_ptr;
}
bool Wizard::isAutomaticProgressCreationEnabled() const
{
Q_D(const Wizard);
......@@ -563,6 +568,7 @@ WizardProgress::~WizardProgress()
delete it.key();
++it;
}
delete d_ptr;
}
WizardProgressItem *WizardProgress::addItem(const QString &title)
......@@ -764,7 +770,7 @@ WizardProgressItem::WizardProgressItem(WizardProgress *progress, const QString &
WizardProgressItem::~WizardProgressItem()
{
delete d_ptr;
}
void WizardProgressItem::addPage(int pageId)
......
......@@ -47,7 +47,8 @@ class QTCREATOR_UTILS_EXPORT Wizard : public QWizard
Q_PROPERTY(bool automaticProgressCreationEnabled READ isAutomaticProgressCreationEnabled WRITE setAutomaticProgressCreationEnabled)
public:
explicit Wizard(QWidget *parent = 0);
explicit Wizard(QWidget *parent = 0, Qt::WindowFlags flags = 0);
virtual ~Wizard();
bool isAutomaticProgressCreationEnabled() const;
void setAutomaticProgressCreationEnabled(bool enabled);
......@@ -66,7 +67,7 @@ private:
Q_DISABLE_COPY(Wizard)
Q_DECLARE_PRIVATE(Wizard)
QScopedPointer<WizardPrivate> d_ptr;
class WizardPrivate *d_ptr;
};
class WizardProgressItem;
......@@ -118,7 +119,7 @@ private:
Q_DISABLE_COPY(WizardProgress)
Q_DECLARE_PRIVATE(WizardProgress)
QScopedPointer<WizardProgressPrivate> d_ptr;
class WizardProgressPrivate *d_ptr;
};
class WizardProgressItemPrivate;
......@@ -150,7 +151,7 @@ private:
Q_DISABLE_COPY(WizardProgressItem)
Q_DECLARE_PRIVATE(WizardProgressItem)
QScopedPointer<WizardProgressItemPrivate> d_ptr;
class WizardProgressItemPrivate *d_ptr;
};
} // namespace Utils
......
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