summaryrefslogtreecommitdiffstats
path: root/tools/shared/qtgradienteditor
diff options
context:
space:
mode:
Diffstat (limited to 'tools/shared/qtgradienteditor')
-rw-r--r--tools/shared/qtgradienteditor/qtcolorbutton.cpp4
-rw-r--r--tools/shared/qtgradienteditor/qtcolorbutton.h2
-rw-r--r--tools/shared/qtgradienteditor/qtcolorline.cpp4
-rw-r--r--tools/shared/qtgradienteditor/qtcolorline.h2
-rw-r--r--tools/shared/qtgradienteditor/qtgradientdialog.cpp4
-rw-r--r--tools/shared/qtgradienteditor/qtgradientdialog.h2
-rw-r--r--tools/shared/qtgradienteditor/qtgradienteditor.cpp4
-rw-r--r--tools/shared/qtgradienteditor/qtgradienteditor.h2
-rw-r--r--tools/shared/qtgradienteditor/qtgradientstopscontroller.cpp4
-rw-r--r--tools/shared/qtgradienteditor/qtgradientstopscontroller.h2
-rw-r--r--tools/shared/qtgradienteditor/qtgradientstopsmodel.cpp7
-rw-r--r--tools/shared/qtgradienteditor/qtgradientstopsmodel.h4
-rw-r--r--tools/shared/qtgradienteditor/qtgradientstopswidget.cpp4
-rw-r--r--tools/shared/qtgradienteditor/qtgradientstopswidget.h2
-rw-r--r--tools/shared/qtgradienteditor/qtgradientwidget.cpp4
-rw-r--r--tools/shared/qtgradienteditor/qtgradientwidget.h2
16 files changed, 18 insertions, 35 deletions
diff --git a/tools/shared/qtgradienteditor/qtcolorbutton.cpp b/tools/shared/qtgradienteditor/qtcolorbutton.cpp
index 30a9c66..d7aaa2e 100644
--- a/tools/shared/qtgradienteditor/qtcolorbutton.cpp
+++ b/tools/shared/qtgradienteditor/qtcolorbutton.cpp
@@ -121,9 +121,8 @@ QPixmap QtColorButtonPrivate::generatePixmap() const
///////////////
QtColorButton::QtColorButton(QWidget *parent)
- : QToolButton(parent)
+ : QToolButton(parent), d_ptr(new QtColorButtonPrivate)
{
- d_ptr = new QtColorButtonPrivate;
d_ptr->q_ptr = this;
d_ptr->m_dragging = false;
d_ptr->m_backgroundCheckered = true;
@@ -136,7 +135,6 @@ QtColorButton::QtColorButton(QWidget *parent)
QtColorButton::~QtColorButton()
{
- delete d_ptr;
}
void QtColorButton::setColor(const QColor &color)
diff --git a/tools/shared/qtgradienteditor/qtcolorbutton.h b/tools/shared/qtgradienteditor/qtcolorbutton.h
index 6cae0a9..0348998 100644
--- a/tools/shared/qtgradienteditor/qtcolorbutton.h
+++ b/tools/shared/qtgradienteditor/qtcolorbutton.h
@@ -75,7 +75,7 @@ protected:
void dropEvent(QDropEvent *event);
#endif
private:
- class QtColorButtonPrivate *d_ptr;
+ QScopedPointer<class QtColorButtonPrivate> d_ptr;
Q_DECLARE_PRIVATE(QtColorButton)
Q_DISABLE_COPY(QtColorButton)
Q_PRIVATE_SLOT(d_func(), void slotEditColor())
diff --git a/tools/shared/qtgradienteditor/qtcolorline.cpp b/tools/shared/qtgradienteditor/qtcolorline.cpp
index 066596c..8517933 100644
--- a/tools/shared/qtgradienteditor/qtcolorline.cpp
+++ b/tools/shared/qtgradienteditor/qtcolorline.cpp
@@ -999,9 +999,8 @@ void QtColorLinePrivate::mouseDoubleClickEvent(QMouseEvent *event)
////////////////////////////////////////////////////
QtColorLine::QtColorLine(QWidget *parent)
- : QWidget(parent)
+ : QWidget(parent), d_ptr(new QtColorLinePrivate)
{
- d_ptr = new QtColorLinePrivate;
d_ptr->q_ptr = this;
setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed));
@@ -1009,7 +1008,6 @@ QtColorLine::QtColorLine(QWidget *parent)
QtColorLine::~QtColorLine()
{
- delete d_ptr;
}
QSize QtColorLine::minimumSizeHint() const
diff --git a/tools/shared/qtgradienteditor/qtcolorline.h b/tools/shared/qtgradienteditor/qtcolorline.h
index bfbec9e..ffd3eea 100644
--- a/tools/shared/qtgradienteditor/qtcolorline.h
+++ b/tools/shared/qtgradienteditor/qtcolorline.h
@@ -114,7 +114,7 @@ protected:
private:
- class QtColorLinePrivate *d_ptr;
+ QScopedPointer<class QtColorLinePrivate> d_ptr;
Q_DECLARE_PRIVATE(QtColorLine)
Q_DISABLE_COPY(QtColorLine)
};
diff --git a/tools/shared/qtgradienteditor/qtgradientdialog.cpp b/tools/shared/qtgradienteditor/qtgradientdialog.cpp
index 9605403..c61bff2 100644
--- a/tools/shared/qtgradienteditor/qtgradientdialog.cpp
+++ b/tools/shared/qtgradienteditor/qtgradientdialog.cpp
@@ -200,10 +200,9 @@ void QtGradientDialogPrivate::slotAboutToShowDetails(bool details, int extension
*/
QtGradientDialog::QtGradientDialog(QWidget *parent)
- : QDialog(parent)
+ : QDialog(parent), d_ptr(new QtGradientDialogPrivate())
{
// setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
- d_ptr = new QtGradientDialogPrivate();
d_ptr->q_ptr = this;
d_ptr->m_ui.setupUi(this);
QPushButton *button = d_ptr->m_ui.buttonBox->button(QDialogButtonBox::Ok);
@@ -222,7 +221,6 @@ QtGradientDialog::QtGradientDialog(QWidget *parent)
QtGradientDialog::~QtGradientDialog()
{
- delete d_ptr;
}
/*!
diff --git a/tools/shared/qtgradienteditor/qtgradientdialog.h b/tools/shared/qtgradienteditor/qtgradientdialog.h
index f97e75f..f293a28 100644
--- a/tools/shared/qtgradienteditor/qtgradientdialog.h
+++ b/tools/shared/qtgradienteditor/qtgradientdialog.h
@@ -76,7 +76,7 @@ public:
static QGradient getGradient(bool *ok, QWidget *parent = 0, const QString &caption = QString());
private:
- class QtGradientDialogPrivate *d_ptr;
+ QScopedPointer<class QtGradientDialogPrivate> d_ptr;
Q_DECLARE_PRIVATE(QtGradientDialog)
Q_DISABLE_COPY(QtGradientDialog)
Q_PRIVATE_SLOT(d_func(), void slotAboutToShowDetails(bool details, int extensionWidthHint))
diff --git a/tools/shared/qtgradienteditor/qtgradienteditor.cpp b/tools/shared/qtgradienteditor/qtgradienteditor.cpp
index 0671176..f9cc1f4 100644
--- a/tools/shared/qtgradienteditor/qtgradienteditor.cpp
+++ b/tools/shared/qtgradienteditor/qtgradienteditor.cpp
@@ -727,9 +727,8 @@ void QtGradientEditorPrivate::setAngleConical(qreal angle)
}
QtGradientEditor::QtGradientEditor(QWidget *parent)
- : QWidget(parent)
+ : QWidget(parent), d_ptr(new QtGradientEditorPrivate())
{
- d_ptr = new QtGradientEditorPrivate();
d_ptr->q_ptr = this;
d_ptr->m_type = QGradient::RadialGradient;
d_ptr->m_ui.setupUi(this);
@@ -835,7 +834,6 @@ QtGradientEditor::~QtGradientEditor()
{
if (d_ptr->m_hiddenWidget)
delete d_ptr->m_hiddenWidget;
- delete d_ptr;
}
void QtGradientEditor::setGradient(const QGradient &grad)
diff --git a/tools/shared/qtgradienteditor/qtgradienteditor.h b/tools/shared/qtgradienteditor/qtgradienteditor.h
index 9e8518f..2d96515 100644
--- a/tools/shared/qtgradienteditor/qtgradienteditor.h
+++ b/tools/shared/qtgradienteditor/qtgradienteditor.h
@@ -78,7 +78,7 @@ signals:
void aboutToShowDetails(bool details, int extenstionWidthHint);
private:
- class QtGradientEditorPrivate *d_ptr;
+ QScopedPointer<class QtGradientEditorPrivate> d_ptr;
Q_DECLARE_PRIVATE(QtGradientEditor)
Q_DISABLE_COPY(QtGradientEditor)
Q_PRIVATE_SLOT(d_func(), void slotGradientStopsChanged(const QGradientStops &stops))
diff --git a/tools/shared/qtgradienteditor/qtgradientstopscontroller.cpp b/tools/shared/qtgradienteditor/qtgradientstopscontroller.cpp
index 35e77e8..6b684f2 100644
--- a/tools/shared/qtgradienteditor/qtgradientstopscontroller.cpp
+++ b/tools/shared/qtgradienteditor/qtgradientstopscontroller.cpp
@@ -594,9 +594,8 @@ void QtGradientStopsControllerPrivate::slotZoomChanged(double zoom)
}
QtGradientStopsController::QtGradientStopsController(QObject *parent)
- : QObject(parent)
+ : QObject(parent), d_ptr(new QtGradientStopsControllerPrivate())
{
- d_ptr = new QtGradientStopsControllerPrivate();
d_ptr->q_ptr = this;
d_ptr->m_spec = QColor::Hsv;
@@ -675,7 +674,6 @@ void QtGradientStopsController::setUi(Ui::QtGradientEditor *ui)
QtGradientStopsController::~QtGradientStopsController()
{
- delete d_ptr;
}
void QtGradientStopsController::setGradientStops(const QGradientStops &stops)
diff --git a/tools/shared/qtgradienteditor/qtgradientstopscontroller.h b/tools/shared/qtgradienteditor/qtgradientstopscontroller.h
index ce831d8..7c6a660 100644
--- a/tools/shared/qtgradienteditor/qtgradientstopscontroller.h
+++ b/tools/shared/qtgradienteditor/qtgradientstopscontroller.h
@@ -70,7 +70,7 @@ signals:
void gradientStopsChanged(const QGradientStops &stops);
private:
- class QtGradientStopsControllerPrivate *d_ptr;
+ QScopedPointer<class QtGradientStopsControllerPrivate> d_ptr;
Q_DECLARE_PRIVATE(QtGradientStopsController)
Q_DISABLE_COPY(QtGradientStopsController)
Q_PRIVATE_SLOT(d_func(), void slotHsvClicked())
diff --git a/tools/shared/qtgradienteditor/qtgradientstopsmodel.cpp b/tools/shared/qtgradienteditor/qtgradientstopsmodel.cpp
index 4611378..52bd367 100644
--- a/tools/shared/qtgradienteditor/qtgradientstopsmodel.cpp
+++ b/tools/shared/qtgradienteditor/qtgradientstopsmodel.cpp
@@ -78,8 +78,8 @@ void QtGradientStop::setPosition(qreal position)
}
QtGradientStop::QtGradientStop(QtGradientStopsModel *model)
+ : d_ptr(new QtGradientStopPrivate())
{
- d_ptr = new QtGradientStopPrivate();
d_ptr->m_position = 0;
d_ptr->m_color = Qt::white;
d_ptr->m_model = model;
@@ -87,7 +87,6 @@ QtGradientStop::QtGradientStop(QtGradientStopsModel *model)
QtGradientStop::~QtGradientStop()
{
- delete d_ptr;
}
class QtGradientStopsModelPrivate
@@ -104,9 +103,8 @@ public:
QtGradientStopsModel::QtGradientStopsModel(QObject *parent)
- : QObject(parent)
+ : QObject(parent), d_ptr(new QtGradientStopsModelPrivate)
{
- d_ptr = new QtGradientStopsModelPrivate;
d_ptr->q_ptr = this;
d_ptr->m_current = 0;
}
@@ -114,7 +112,6 @@ QtGradientStopsModel::QtGradientStopsModel(QObject *parent)
QtGradientStopsModel::~QtGradientStopsModel()
{
clear();
- delete d_ptr;
}
QtGradientStopsModel::PositionStopMap QtGradientStopsModel::stops() const
diff --git a/tools/shared/qtgradienteditor/qtgradientstopsmodel.h b/tools/shared/qtgradienteditor/qtgradientstopsmodel.h
index a1d593a..a02ebc5 100644
--- a/tools/shared/qtgradienteditor/qtgradientstopsmodel.h
+++ b/tools/shared/qtgradienteditor/qtgradientstopsmodel.h
@@ -64,7 +64,7 @@ private:
friend class QtGradientStopsModel;
QtGradientStop(QtGradientStopsModel *model = 0);
~QtGradientStop();
- class QtGradientStopPrivate *d_ptr;
+ QScopedPointer<class QtGradientStopPrivate> d_ptr;
};
class QtGradientStopsModel : public QObject
@@ -111,7 +111,7 @@ signals:
void currentStopChanged(QtGradientStop *stop);
private:
- class QtGradientStopsModelPrivate *d_ptr;
+ QScopedPointer<class QtGradientStopsModelPrivate> d_ptr;
Q_DECLARE_PRIVATE(QtGradientStopsModel)
Q_DISABLE_COPY(QtGradientStopsModel)
};
diff --git a/tools/shared/qtgradienteditor/qtgradientstopswidget.cpp b/tools/shared/qtgradienteditor/qtgradientstopswidget.cpp
index 6eb4d45..2d75832 100644
--- a/tools/shared/qtgradienteditor/qtgradientstopswidget.cpp
+++ b/tools/shared/qtgradienteditor/qtgradientstopswidget.cpp
@@ -360,9 +360,8 @@ void QtGradientStopsWidgetPrivate::slotResetZoom()
}
QtGradientStopsWidget::QtGradientStopsWidget(QWidget *parent)
- : QAbstractScrollArea(parent)
+ : QAbstractScrollArea(parent), d_ptr(new QtGradientStopsWidgetPrivate)
{
- d_ptr = new QtGradientStopsWidgetPrivate;
d_ptr->q_ptr = this;
d_ptr->m_backgroundCheckered = true;
d_ptr->m_model = 0;
@@ -391,7 +390,6 @@ QtGradientStopsWidget::QtGradientStopsWidget(QWidget *parent)
QtGradientStopsWidget::~QtGradientStopsWidget()
{
- delete d_ptr;
}
QSize QtGradientStopsWidget::sizeHint() const
diff --git a/tools/shared/qtgradienteditor/qtgradientstopswidget.h b/tools/shared/qtgradienteditor/qtgradientstopswidget.h
index 20ed9e3..753d695 100644
--- a/tools/shared/qtgradienteditor/qtgradientstopswidget.h
+++ b/tools/shared/qtgradienteditor/qtgradientstopswidget.h
@@ -91,7 +91,7 @@ protected:
#endif
private:
- QtGradientStopsWidgetPrivate *d_ptr;
+ QScopedPointer<QtGradientStopsWidgetPrivate> d_ptr;
Q_DECLARE_PRIVATE(QtGradientStopsWidget)
Q_DISABLE_COPY(QtGradientStopsWidget)
Q_PRIVATE_SLOT(d_func(), void slotStopAdded(QtGradientStop *stop))
diff --git a/tools/shared/qtgradienteditor/qtgradientwidget.cpp b/tools/shared/qtgradienteditor/qtgradientwidget.cpp
index ae94a65..73c0547 100644
--- a/tools/shared/qtgradienteditor/qtgradientwidget.cpp
+++ b/tools/shared/qtgradienteditor/qtgradientwidget.cpp
@@ -232,9 +232,8 @@ void QtGradientWidgetPrivate::setupDrag(QtGradientStop *stop, int x)
////////////////////////////
QtGradientWidget::QtGradientWidget(QWidget *parent)
- : QWidget(parent)
+ : QWidget(parent), d_ptr(new QtGradientWidgetPrivate)
{
- d_ptr = new QtGradientWidgetPrivate;
d_ptr->q_ptr = this;
d_ptr->m_backgroundCheckered = true;
d_ptr->m_handleSize = 20.0;
@@ -253,7 +252,6 @@ QtGradientWidget::QtGradientWidget(QWidget *parent)
QtGradientWidget::~QtGradientWidget()
{
- delete d_ptr;
}
QSize QtGradientWidget::sizeHint() const
diff --git a/tools/shared/qtgradienteditor/qtgradientwidget.h b/tools/shared/qtgradienteditor/qtgradientwidget.h
index 318c03a..3e23bf9 100644
--- a/tools/shared/qtgradienteditor/qtgradientwidget.h
+++ b/tools/shared/qtgradienteditor/qtgradientwidget.h
@@ -110,7 +110,7 @@ protected:
void mouseDoubleClickEvent(QMouseEvent *e);
private:
- class QtGradientWidgetPrivate *d_ptr;
+ QScopedPointer<class QtGradientWidgetPrivate> d_ptr;
Q_DECLARE_PRIVATE(QtGradientWidget)
Q_DISABLE_COPY(QtGradientWidget)
};