summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJarek Kobus <jkobus@trolltech.com>2010-03-29 18:32:37 +0200
committerJarek Kobus <jkobus@trolltech.com>2010-03-29 18:33:49 +0200
commit2319f57caaaf1668f1d32fec95b104d4ec70b698 (patch)
tree24eae08a6270abeb9e810371c877c390e57adcd0 /src
parentb1aae1b65d0ee5bb10f0de1a97f0ebaa89aa3ac3 (diff)
downloadqt-creator-2319f57caaaf1668f1d32fec95b104d4ec70b698.tar.gz
The constructor of Wizard takes now WindowFlags, get rid of QScopedPointer
Diffstat (limited to 'src')
-rw-r--r--src/libs/utils/wizard.cpp12
-rw-r--r--src/libs/utils/wizard.h9
2 files changed, 14 insertions, 7 deletions
diff --git a/src/libs/utils/wizard.cpp b/src/libs/utils/wizard.cpp
index 0149c882b6..4489c95ca2 100644
--- a/src/libs/utils/wizard.cpp
+++ b/src/libs/utils/wizard.cpp
@@ -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)
diff --git a/src/libs/utils/wizard.h b/src/libs/utils/wizard.h
index 9c222408f6..87e43278c1 100644
--- a/src/libs/utils/wizard.h
+++ b/src/libs/utils/wizard.h
@@ -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