diff options
Diffstat (limited to 'tools/shared/qtpropertybrowser')
14 files changed, 112 insertions, 202 deletions
diff --git a/tools/shared/qtpropertybrowser/qtbuttonpropertybrowser.cpp b/tools/shared/qtpropertybrowser/qtbuttonpropertybrowser.cpp index 570b29a..24bf75a 100644 --- a/tools/shared/qtpropertybrowser/qtbuttonpropertybrowser.cpp +++ b/tools/shared/qtpropertybrowser/qtbuttonpropertybrowser.cpp @@ -547,9 +547,8 @@ void QtButtonPropertyBrowserPrivate::updateItem(WidgetItem *item) Creates a property browser with the given \a parent. */ QtButtonPropertyBrowser::QtButtonPropertyBrowser(QWidget *parent) - : QtAbstractPropertyBrowser(parent) + : QtAbstractPropertyBrowser(parent), d_ptr(new QtButtonPropertyBrowserPrivate) { - d_ptr = new QtButtonPropertyBrowserPrivate; d_ptr->q_ptr = this; d_ptr->init(this); @@ -570,7 +569,6 @@ QtButtonPropertyBrowser::~QtButtonPropertyBrowser() const QMap<QtButtonPropertyBrowserPrivate::WidgetItem *, QtBrowserItem *>::ConstIterator icend = d_ptr->m_itemToIndex.constEnd(); for (QMap<QtButtonPropertyBrowserPrivate::WidgetItem *, QtBrowserItem *>::ConstIterator it = d_ptr->m_itemToIndex.constBegin(); it != icend; ++it) delete it.key(); - delete d_ptr; } /*! diff --git a/tools/shared/qtpropertybrowser/qtbuttonpropertybrowser.h b/tools/shared/qtpropertybrowser/qtbuttonpropertybrowser.h index 4db0318..a558657 100644 --- a/tools/shared/qtpropertybrowser/qtbuttonpropertybrowser.h +++ b/tools/shared/qtpropertybrowser/qtbuttonpropertybrowser.h @@ -71,7 +71,7 @@ protected: private: - QtButtonPropertyBrowserPrivate *d_ptr; + QScopedPointer<QtButtonPropertyBrowserPrivate> d_ptr; Q_DECLARE_PRIVATE(QtButtonPropertyBrowser) Q_DISABLE_COPY(QtButtonPropertyBrowser) Q_PRIVATE_SLOT(d_func(), void slotUpdate()) diff --git a/tools/shared/qtpropertybrowser/qteditorfactory.cpp b/tools/shared/qtpropertybrowser/qteditorfactory.cpp index 60b9f04..7729a73 100644 --- a/tools/shared/qtpropertybrowser/qteditorfactory.cpp +++ b/tools/shared/qtpropertybrowser/qteditorfactory.cpp @@ -227,9 +227,8 @@ void QtSpinBoxFactoryPrivate::slotSetValue(int value) Creates a factory with the given \a parent. */ QtSpinBoxFactory::QtSpinBoxFactory(QObject *parent) - : QtAbstractEditorFactory<QtIntPropertyManager>(parent) + : QtAbstractEditorFactory<QtIntPropertyManager>(parent), d_ptr(new QtSpinBoxFactoryPrivate()) { - d_ptr = new QtSpinBoxFactoryPrivate(); d_ptr->q_ptr = this; } @@ -240,7 +239,6 @@ QtSpinBoxFactory::QtSpinBoxFactory(QObject *parent) QtSpinBoxFactory::~QtSpinBoxFactory() { qDeleteAll(d_ptr->m_editorToProperty.keys()); - delete d_ptr; } /*! @@ -383,9 +381,8 @@ void QtSliderFactoryPrivate::slotSetValue(int value) Creates a factory with the given \a parent. */ QtSliderFactory::QtSliderFactory(QObject *parent) - : QtAbstractEditorFactory<QtIntPropertyManager>(parent) + : QtAbstractEditorFactory<QtIntPropertyManager>(parent), d_ptr(new QtSliderFactoryPrivate()) { - d_ptr = new QtSliderFactoryPrivate(); d_ptr->q_ptr = this; } @@ -396,7 +393,6 @@ QtSliderFactory::QtSliderFactory(QObject *parent) QtSliderFactory::~QtSliderFactory() { qDeleteAll(d_ptr->m_editorToProperty.keys()); - delete d_ptr; } /*! @@ -539,9 +535,8 @@ void QtScrollBarFactoryPrivate::slotSetValue(int value) Creates a factory with the given \a parent. */ QtScrollBarFactory::QtScrollBarFactory(QObject *parent) - : QtAbstractEditorFactory<QtIntPropertyManager>(parent) + : QtAbstractEditorFactory<QtIntPropertyManager>(parent), d_ptr(new QtScrollBarFactoryPrivate()) { - d_ptr = new QtScrollBarFactoryPrivate(); d_ptr->q_ptr = this; } @@ -552,7 +547,6 @@ QtScrollBarFactory::QtScrollBarFactory(QObject *parent) QtScrollBarFactory::~QtScrollBarFactory() { qDeleteAll(d_ptr->m_editorToProperty.keys()); - delete d_ptr; } /*! @@ -661,9 +655,8 @@ void QtCheckBoxFactoryPrivate::slotSetValue(bool value) Creates a factory with the given \a parent. */ QtCheckBoxFactory::QtCheckBoxFactory(QObject *parent) - : QtAbstractEditorFactory<QtBoolPropertyManager>(parent) + : QtAbstractEditorFactory<QtBoolPropertyManager>(parent), d_ptr(new QtCheckBoxFactoryPrivate()) { - d_ptr = new QtCheckBoxFactoryPrivate(); d_ptr->q_ptr = this; } @@ -674,7 +667,6 @@ QtCheckBoxFactory::QtCheckBoxFactory(QObject *parent) QtCheckBoxFactory::~QtCheckBoxFactory() { qDeleteAll(d_ptr->m_editorToProperty.keys()); - delete d_ptr; } /*! @@ -836,9 +828,8 @@ void QtDoubleSpinBoxFactoryPrivate::slotSetValue(double value) Creates a factory with the given \a parent. */ QtDoubleSpinBoxFactory::QtDoubleSpinBoxFactory(QObject *parent) - : QtAbstractEditorFactory<QtDoublePropertyManager>(parent) + : QtAbstractEditorFactory<QtDoublePropertyManager>(parent), d_ptr(new QtDoubleSpinBoxFactoryPrivate()) { - d_ptr = new QtDoubleSpinBoxFactoryPrivate(); d_ptr->q_ptr = this; } @@ -849,7 +840,6 @@ QtDoubleSpinBoxFactory::QtDoubleSpinBoxFactory(QObject *parent) QtDoubleSpinBoxFactory::~QtDoubleSpinBoxFactory() { qDeleteAll(d_ptr->m_editorToProperty.keys()); - delete d_ptr; } /*! @@ -991,9 +981,8 @@ void QtLineEditFactoryPrivate::slotSetValue(const QString &value) Creates a factory with the given \a parent. */ QtLineEditFactory::QtLineEditFactory(QObject *parent) - : QtAbstractEditorFactory<QtStringPropertyManager>(parent) + : QtAbstractEditorFactory<QtStringPropertyManager>(parent), d_ptr(new QtLineEditFactoryPrivate()) { - d_ptr = new QtLineEditFactoryPrivate(); d_ptr->q_ptr = this; } @@ -1004,7 +993,6 @@ QtLineEditFactory::QtLineEditFactory(QObject *parent) QtLineEditFactory::~QtLineEditFactory() { qDeleteAll(d_ptr->m_editorToProperty.keys()); - delete d_ptr; } /*! @@ -1134,9 +1122,8 @@ void QtDateEditFactoryPrivate::slotSetValue(const QDate &value) Creates a factory with the given \a parent. */ QtDateEditFactory::QtDateEditFactory(QObject *parent) - : QtAbstractEditorFactory<QtDatePropertyManager>(parent) + : QtAbstractEditorFactory<QtDatePropertyManager>(parent), d_ptr(new QtDateEditFactoryPrivate()) { - d_ptr = new QtDateEditFactoryPrivate(); d_ptr->q_ptr = this; } @@ -1147,7 +1134,6 @@ QtDateEditFactory::QtDateEditFactory(QObject *parent) QtDateEditFactory::~QtDateEditFactory() { qDeleteAll(d_ptr->m_editorToProperty.keys()); - delete d_ptr; } /*! @@ -1252,9 +1238,8 @@ void QtTimeEditFactoryPrivate::slotSetValue(const QTime &value) Creates a factory with the given \a parent. */ QtTimeEditFactory::QtTimeEditFactory(QObject *parent) - : QtAbstractEditorFactory<QtTimePropertyManager>(parent) + : QtAbstractEditorFactory<QtTimePropertyManager>(parent), d_ptr(new QtTimeEditFactoryPrivate()) { - d_ptr = new QtTimeEditFactoryPrivate(); d_ptr->q_ptr = this; } @@ -1265,7 +1250,6 @@ QtTimeEditFactory::QtTimeEditFactory(QObject *parent) QtTimeEditFactory::~QtTimeEditFactory() { qDeleteAll(d_ptr->m_editorToProperty.keys()); - delete d_ptr; } /*! @@ -1367,9 +1351,8 @@ void QtDateTimeEditFactoryPrivate::slotSetValue(const QDateTime &value) Creates a factory with the given \a parent. */ QtDateTimeEditFactory::QtDateTimeEditFactory(QObject *parent) - : QtAbstractEditorFactory<QtDateTimePropertyManager>(parent) + : QtAbstractEditorFactory<QtDateTimePropertyManager>(parent), d_ptr(new QtDateTimeEditFactoryPrivate()) { - d_ptr = new QtDateTimeEditFactoryPrivate(); d_ptr->q_ptr = this; } @@ -1380,7 +1363,6 @@ QtDateTimeEditFactory::QtDateTimeEditFactory(QObject *parent) QtDateTimeEditFactory::~QtDateTimeEditFactory() { qDeleteAll(d_ptr->m_editorToProperty.keys()); - delete d_ptr; } /*! @@ -1481,9 +1463,8 @@ void QtKeySequenceEditorFactoryPrivate::slotSetValue(const QKeySequence &value) Creates a factory with the given \a parent. */ QtKeySequenceEditorFactory::QtKeySequenceEditorFactory(QObject *parent) - : QtAbstractEditorFactory<QtKeySequencePropertyManager>(parent) + : QtAbstractEditorFactory<QtKeySequencePropertyManager>(parent), d_ptr(new QtKeySequenceEditorFactoryPrivate()) { - d_ptr = new QtKeySequenceEditorFactoryPrivate(); d_ptr->q_ptr = this; } @@ -1494,7 +1475,6 @@ QtKeySequenceEditorFactory::QtKeySequenceEditorFactory(QObject *parent) QtKeySequenceEditorFactory::~QtKeySequenceEditorFactory() { qDeleteAll(d_ptr->m_editorToProperty.keys()); - delete d_ptr; } /*! @@ -1765,9 +1745,8 @@ void QtCharEditorFactoryPrivate::slotSetValue(const QChar &value) Creates a factory with the given \a parent. */ QtCharEditorFactory::QtCharEditorFactory(QObject *parent) - : QtAbstractEditorFactory<QtCharPropertyManager>(parent) + : QtAbstractEditorFactory<QtCharPropertyManager>(parent), d_ptr(new QtCharEditorFactoryPrivate()) { - d_ptr = new QtCharEditorFactoryPrivate(); d_ptr->q_ptr = this; } @@ -1778,7 +1757,6 @@ QtCharEditorFactory::QtCharEditorFactory(QObject *parent) QtCharEditorFactory::~QtCharEditorFactory() { qDeleteAll(d_ptr->m_editorToProperty.keys()); - delete d_ptr; } /*! @@ -1929,9 +1907,8 @@ void QtEnumEditorFactoryPrivate::slotSetValue(int value) Creates a factory with the given \a parent. */ QtEnumEditorFactory::QtEnumEditorFactory(QObject *parent) - : QtAbstractEditorFactory<QtEnumPropertyManager>(parent) + : QtAbstractEditorFactory<QtEnumPropertyManager>(parent), d_ptr(new QtEnumEditorFactoryPrivate()) { - d_ptr = new QtEnumEditorFactoryPrivate(); d_ptr->q_ptr = this; } @@ -1942,7 +1919,6 @@ QtEnumEditorFactory::QtEnumEditorFactory(QObject *parent) QtEnumEditorFactory::~QtEnumEditorFactory() { qDeleteAll(d_ptr->m_editorToProperty.keys()); - delete d_ptr; } /*! @@ -2094,9 +2070,8 @@ void QtCursorEditorFactoryPrivate::slotEditorDestroyed(QObject *object) Creates a factory with the given \a parent. */ QtCursorEditorFactory::QtCursorEditorFactory(QObject *parent) - : QtAbstractEditorFactory<QtCursorPropertyManager>(parent) + : QtAbstractEditorFactory<QtCursorPropertyManager>(parent), d_ptr(new QtCursorEditorFactoryPrivate()) { - d_ptr = new QtCursorEditorFactoryPrivate(); d_ptr->q_ptr = this; d_ptr->m_enumEditorFactory = new QtEnumEditorFactory(this); @@ -2111,7 +2086,6 @@ QtCursorEditorFactory::QtCursorEditorFactory(QObject *parent) */ QtCursorEditorFactory::~QtCursorEditorFactory() { - delete d_ptr; } /*! @@ -2328,7 +2302,6 @@ QtColorEditorFactory::QtColorEditorFactory(QObject *parent) : QtColorEditorFactory::~QtColorEditorFactory() { qDeleteAll(d_ptr->m_editorToProperty.keys()); - delete d_ptr; } /*! @@ -2542,7 +2515,6 @@ QtFontEditorFactory::QtFontEditorFactory(QObject *parent) : QtFontEditorFactory::~QtFontEditorFactory() { qDeleteAll(d_ptr->m_editorToProperty.keys()); - delete d_ptr; } /*! diff --git a/tools/shared/qtpropertybrowser/qteditorfactory.h b/tools/shared/qtpropertybrowser/qteditorfactory.h index ec51d00..bad2080 100644 --- a/tools/shared/qtpropertybrowser/qteditorfactory.h +++ b/tools/shared/qtpropertybrowser/qteditorfactory.h @@ -60,7 +60,7 @@ protected: QWidget *parent); void disconnectPropertyManager(QtIntPropertyManager *manager); private: - QtSpinBoxFactoryPrivate *d_ptr; + QScopedPointer<QtSpinBoxFactoryPrivate> d_ptr; Q_DECLARE_PRIVATE(QtSpinBoxFactory) Q_DISABLE_COPY(QtSpinBoxFactory) Q_PRIVATE_SLOT(d_func(), void slotPropertyChanged(QtProperty *, int)) @@ -84,7 +84,7 @@ protected: QWidget *parent); void disconnectPropertyManager(QtIntPropertyManager *manager); private: - QtSliderFactoryPrivate *d_ptr; + QScopedPointer<QtSliderFactoryPrivate> d_ptr; Q_DECLARE_PRIVATE(QtSliderFactory) Q_DISABLE_COPY(QtSliderFactory) Q_PRIVATE_SLOT(d_func(), void slotPropertyChanged(QtProperty *, int)) @@ -108,7 +108,7 @@ protected: QWidget *parent); void disconnectPropertyManager(QtIntPropertyManager *manager); private: - QtScrollBarFactoryPrivate *d_ptr; + QScopedPointer<QtScrollBarFactoryPrivate> d_ptr; Q_DECLARE_PRIVATE(QtScrollBarFactory) Q_DISABLE_COPY(QtScrollBarFactory) Q_PRIVATE_SLOT(d_func(), void slotPropertyChanged(QtProperty *, int)) @@ -132,7 +132,7 @@ protected: QWidget *parent); void disconnectPropertyManager(QtBoolPropertyManager *manager); private: - QtCheckBoxFactoryPrivate *d_ptr; + QScopedPointer<QtCheckBoxFactoryPrivate> d_ptr; Q_DECLARE_PRIVATE(QtCheckBoxFactory) Q_DISABLE_COPY(QtCheckBoxFactory) Q_PRIVATE_SLOT(d_func(), void slotPropertyChanged(QtProperty *, bool)) @@ -154,7 +154,7 @@ protected: QWidget *parent); void disconnectPropertyManager(QtDoublePropertyManager *manager); private: - QtDoubleSpinBoxFactoryPrivate *d_ptr; + QScopedPointer<QtDoubleSpinBoxFactoryPrivate> d_ptr; Q_DECLARE_PRIVATE(QtDoubleSpinBoxFactory) Q_DISABLE_COPY(QtDoubleSpinBoxFactory) Q_PRIVATE_SLOT(d_func(), void slotPropertyChanged(QtProperty *, double)) @@ -179,7 +179,7 @@ protected: QWidget *parent); void disconnectPropertyManager(QtStringPropertyManager *manager); private: - QtLineEditFactoryPrivate *d_ptr; + QScopedPointer<QtLineEditFactoryPrivate> d_ptr; Q_DECLARE_PRIVATE(QtLineEditFactory) Q_DISABLE_COPY(QtLineEditFactory) Q_PRIVATE_SLOT(d_func(), void slotPropertyChanged(QtProperty *, const QString &)) @@ -202,7 +202,7 @@ protected: QWidget *parent); void disconnectPropertyManager(QtDatePropertyManager *manager); private: - QtDateEditFactoryPrivate *d_ptr; + QScopedPointer<QtDateEditFactoryPrivate> d_ptr; Q_DECLARE_PRIVATE(QtDateEditFactory) Q_DISABLE_COPY(QtDateEditFactory) Q_PRIVATE_SLOT(d_func(), void slotPropertyChanged(QtProperty *, const QDate &)) @@ -226,7 +226,7 @@ protected: QWidget *parent); void disconnectPropertyManager(QtTimePropertyManager *manager); private: - QtTimeEditFactoryPrivate *d_ptr; + QScopedPointer<QtTimeEditFactoryPrivate> d_ptr; Q_DECLARE_PRIVATE(QtTimeEditFactory) Q_DISABLE_COPY(QtTimeEditFactory) Q_PRIVATE_SLOT(d_func(), void slotPropertyChanged(QtProperty *, const QTime &)) @@ -248,7 +248,7 @@ protected: QWidget *parent); void disconnectPropertyManager(QtDateTimePropertyManager *manager); private: - QtDateTimeEditFactoryPrivate *d_ptr; + QScopedPointer<QtDateTimeEditFactoryPrivate> d_ptr; Q_DECLARE_PRIVATE(QtDateTimeEditFactory) Q_DISABLE_COPY(QtDateTimeEditFactory) Q_PRIVATE_SLOT(d_func(), void slotPropertyChanged(QtProperty *, const QDateTime &)) @@ -270,7 +270,7 @@ protected: QWidget *parent); void disconnectPropertyManager(QtKeySequencePropertyManager *manager); private: - QtKeySequenceEditorFactoryPrivate *d_ptr; + QScopedPointer<QtKeySequenceEditorFactoryPrivate> d_ptr; Q_DECLARE_PRIVATE(QtKeySequenceEditorFactory) Q_DISABLE_COPY(QtKeySequenceEditorFactory) Q_PRIVATE_SLOT(d_func(), void slotPropertyChanged(QtProperty *, const QKeySequence &)) @@ -292,7 +292,7 @@ protected: QWidget *parent); void disconnectPropertyManager(QtCharPropertyManager *manager); private: - QtCharEditorFactoryPrivate *d_ptr; + QScopedPointer<QtCharEditorFactoryPrivate> d_ptr; Q_DECLARE_PRIVATE(QtCharEditorFactory) Q_DISABLE_COPY(QtCharEditorFactory) Q_PRIVATE_SLOT(d_func(), void slotPropertyChanged(QtProperty *, const QChar &)) @@ -314,7 +314,7 @@ protected: QWidget *parent); void disconnectPropertyManager(QtEnumPropertyManager *manager); private: - QtEnumEditorFactoryPrivate *d_ptr; + QScopedPointer<QtEnumEditorFactoryPrivate> d_ptr; Q_DECLARE_PRIVATE(QtEnumEditorFactory) Q_DISABLE_COPY(QtEnumEditorFactory) Q_PRIVATE_SLOT(d_func(), void slotPropertyChanged(QtProperty *, int)) @@ -340,7 +340,7 @@ protected: QWidget *parent); void disconnectPropertyManager(QtCursorPropertyManager *manager); private: - QtCursorEditorFactoryPrivate *d_ptr; + QScopedPointer<QtCursorEditorFactoryPrivate> d_ptr; Q_DECLARE_PRIVATE(QtCursorEditorFactory) Q_DISABLE_COPY(QtCursorEditorFactory) Q_PRIVATE_SLOT(d_func(), void slotPropertyChanged(QtProperty *, const QCursor &)) @@ -362,7 +362,7 @@ protected: QWidget *parent); void disconnectPropertyManager(QtColorPropertyManager *manager); private: - QtColorEditorFactoryPrivate *d_ptr; + QScopedPointer<QtColorEditorFactoryPrivate> d_ptr; Q_DECLARE_PRIVATE(QtColorEditorFactory) Q_DISABLE_COPY(QtColorEditorFactory) Q_PRIVATE_SLOT(d_func(), void slotPropertyChanged(QtProperty *, const QColor &)) @@ -384,7 +384,7 @@ protected: QWidget *parent); void disconnectPropertyManager(QtFontPropertyManager *manager); private: - QtFontEditorFactoryPrivate *d_ptr; + QScopedPointer<QtFontEditorFactoryPrivate> d_ptr; Q_DECLARE_PRIVATE(QtFontEditorFactory) Q_DISABLE_COPY(QtFontEditorFactory) Q_PRIVATE_SLOT(d_func(), void slotPropertyChanged(QtProperty *, const QFont &)) diff --git a/tools/shared/qtpropertybrowser/qtgroupboxpropertybrowser.cpp b/tools/shared/qtpropertybrowser/qtgroupboxpropertybrowser.cpp index ee82065..31a2135 100644 --- a/tools/shared/qtpropertybrowser/qtgroupboxpropertybrowser.cpp +++ b/tools/shared/qtpropertybrowser/qtgroupboxpropertybrowser.cpp @@ -476,9 +476,8 @@ void QtGroupBoxPropertyBrowserPrivate::updateItem(WidgetItem *item) Creates a property browser with the given \a parent. */ QtGroupBoxPropertyBrowser::QtGroupBoxPropertyBrowser(QWidget *parent) - : QtAbstractPropertyBrowser(parent) + : QtAbstractPropertyBrowser(parent), d_ptr(new QtGroupBoxPropertyBrowserPrivate) { - d_ptr = new QtGroupBoxPropertyBrowserPrivate; d_ptr->q_ptr = this; d_ptr->init(this); @@ -499,7 +498,6 @@ QtGroupBoxPropertyBrowser::~QtGroupBoxPropertyBrowser() const QMap<QtGroupBoxPropertyBrowserPrivate::WidgetItem *, QtBrowserItem *>::ConstIterator icend = d_ptr->m_itemToIndex.constEnd(); for (QMap<QtGroupBoxPropertyBrowserPrivate::WidgetItem *, QtBrowserItem *>::ConstIterator it = d_ptr->m_itemToIndex.constBegin(); it != icend; ++it) delete it.key(); - delete d_ptr; } /*! diff --git a/tools/shared/qtpropertybrowser/qtgroupboxpropertybrowser.h b/tools/shared/qtpropertybrowser/qtgroupboxpropertybrowser.h index 2d8ae91..1cfda63 100644 --- a/tools/shared/qtpropertybrowser/qtgroupboxpropertybrowser.h +++ b/tools/shared/qtpropertybrowser/qtgroupboxpropertybrowser.h @@ -63,7 +63,7 @@ protected: private: - QtGroupBoxPropertyBrowserPrivate *d_ptr; + QScopedPointer<QtGroupBoxPropertyBrowserPrivate> d_ptr; Q_DECLARE_PRIVATE(QtGroupBoxPropertyBrowser) Q_DISABLE_COPY(QtGroupBoxPropertyBrowser) Q_PRIVATE_SLOT(d_func(), void slotUpdate()) diff --git a/tools/shared/qtpropertybrowser/qtpropertybrowser.cpp b/tools/shared/qtpropertybrowser/qtpropertybrowser.cpp index e20fca4..ebe9417 100644 --- a/tools/shared/qtpropertybrowser/qtpropertybrowser.cpp +++ b/tools/shared/qtpropertybrowser/qtpropertybrowser.cpp @@ -142,8 +142,8 @@ public: \sa QtAbstractPropertyManager::addProperty() */ QtProperty::QtProperty(QtAbstractPropertyManager *manager) + : d_ptr(new QtPropertyPrivate(manager)) { - d_ptr = new QtPropertyPrivate(manager); d_ptr->q_ptr = this; } @@ -177,7 +177,6 @@ QtProperty::~QtProperty() QtProperty *property = itParent.next(); property->d_ptr->m_subItems.removeAll(this); } - delete d_ptr; } /*! @@ -638,9 +637,8 @@ void QtAbstractPropertyManagerPrivate::propertyInserted(QtProperty *property, Creates an abstract property manager with the given \a parent. */ QtAbstractPropertyManager::QtAbstractPropertyManager(QObject *parent) - : QObject(parent) + : QObject(parent), d_ptr(new QtAbstractPropertyManagerPrivate) { - d_ptr = new QtAbstractPropertyManagerPrivate; d_ptr->q_ptr = this; } @@ -652,7 +650,6 @@ QtAbstractPropertyManager::QtAbstractPropertyManager(QObject *parent) QtAbstractPropertyManager::~QtAbstractPropertyManager() { clear(); - delete d_ptr; } /*! @@ -1167,14 +1164,13 @@ QtAbstractPropertyBrowser *QtBrowserItem::browser() const } QtBrowserItem::QtBrowserItem(QtAbstractPropertyBrowser *browser, QtProperty *property, QtBrowserItem *parent) + : d_ptr(new QtBrowserItemPrivate(browser, property, parent)) { - d_ptr = new QtBrowserItemPrivate(browser, property, parent); d_ptr->q_ptr = this; } QtBrowserItem::~QtBrowserItem() { - delete d_ptr; } @@ -1646,9 +1642,8 @@ void QtAbstractPropertyBrowserPrivate::slotPropertyDataChanged(QtProperty *prope Creates an abstract property browser with the given \a parent. */ QtAbstractPropertyBrowser::QtAbstractPropertyBrowser(QWidget *parent) - : QWidget(parent) + : QWidget(parent), d_ptr(new QtAbstractPropertyBrowserPrivate) { - d_ptr = new QtAbstractPropertyBrowserPrivate; d_ptr->q_ptr = this; } @@ -1671,7 +1666,6 @@ QtAbstractPropertyBrowser::~QtAbstractPropertyBrowser() QListIterator<QtBrowserItem *> itItem(indexes); while (itItem.hasNext()) d_ptr->clearIndex(itItem.next()); - delete d_ptr; } /*! diff --git a/tools/shared/qtpropertybrowser/qtpropertybrowser.h b/tools/shared/qtpropertybrowser/qtpropertybrowser.h index 55b0da0..19996c0 100644 --- a/tools/shared/qtpropertybrowser/qtpropertybrowser.h +++ b/tools/shared/qtpropertybrowser/qtpropertybrowser.h @@ -85,7 +85,7 @@ protected: void propertyChanged(); private: friend class QtAbstractPropertyManager; - QtPropertyPrivate *d_ptr; + QScopedPointer<QtPropertyPrivate> d_ptr; }; class QtAbstractPropertyManagerPrivate; @@ -118,7 +118,7 @@ protected: virtual QtProperty *createProperty(); private: friend class QtProperty; - QtAbstractPropertyManagerPrivate *d_ptr; + QScopedPointer<QtAbstractPropertyManagerPrivate> d_ptr; Q_DECLARE_PRIVATE(QtAbstractPropertyManager) Q_DISABLE_COPY(QtAbstractPropertyManager) }; @@ -235,7 +235,7 @@ public: private: explicit QtBrowserItem(QtAbstractPropertyBrowser *browser, QtProperty *property, QtBrowserItem *parent); ~QtBrowserItem(); - QtBrowserItemPrivate *d_ptr; + QScopedPointer<QtBrowserItemPrivate> d_ptr; friend class QtAbstractPropertyBrowserPrivate; }; @@ -292,7 +292,7 @@ private: bool addFactory(QtAbstractPropertyManager *abstractManager, QtAbstractEditorFactoryBase *abstractFactory); - QtAbstractPropertyBrowserPrivate *d_ptr; + QScopedPointer<QtAbstractPropertyBrowserPrivate> d_ptr; Q_DECLARE_PRIVATE(QtAbstractPropertyBrowser) Q_DISABLE_COPY(QtAbstractPropertyBrowser) Q_PRIVATE_SLOT(d_func(), void slotPropertyInserted(QtProperty *, diff --git a/tools/shared/qtpropertybrowser/qtpropertymanager.cpp b/tools/shared/qtpropertybrowser/qtpropertymanager.cpp index 50f3306..43bd68a 100644 --- a/tools/shared/qtpropertybrowser/qtpropertymanager.cpp +++ b/tools/shared/qtpropertybrowser/qtpropertymanager.cpp @@ -677,9 +677,8 @@ public: Creates a manager with the given \a parent. */ QtIntPropertyManager::QtIntPropertyManager(QObject *parent) - : QtAbstractPropertyManager(parent) + : QtAbstractPropertyManager(parent), d_ptr(new QtIntPropertyManagerPrivate) { - d_ptr = new QtIntPropertyManagerPrivate; d_ptr->q_ptr = this; } @@ -689,7 +688,6 @@ QtIntPropertyManager::QtIntPropertyManager(QObject *parent) QtIntPropertyManager::~QtIntPropertyManager() { clear(); - delete d_ptr; } /*! @@ -762,7 +760,7 @@ QString QtIntPropertyManager::valueText(const QtProperty *property) const void QtIntPropertyManager::setValue(QtProperty *property, int val) { void (QtIntPropertyManagerPrivate::*setSubPropertyValue)(QtProperty *, int) = 0; - setValueInRange<int, QtIntPropertyManagerPrivate, QtIntPropertyManager, int>(this, d_ptr, + setValueInRange<int, QtIntPropertyManagerPrivate, QtIntPropertyManager, int>(this, d_ptr.data(), &QtIntPropertyManager::propertyChanged, &QtIntPropertyManager::valueChanged, property, val, setSubPropertyValue); @@ -779,7 +777,7 @@ void QtIntPropertyManager::setValue(QtProperty *property, int val) */ void QtIntPropertyManager::setMinimum(QtProperty *property, int minVal) { - setMinimumValue<int, QtIntPropertyManagerPrivate, QtIntPropertyManager, int, QtIntPropertyManagerPrivate::Data>(this, d_ptr, + setMinimumValue<int, QtIntPropertyManagerPrivate, QtIntPropertyManager, int, QtIntPropertyManagerPrivate::Data>(this, d_ptr.data(), &QtIntPropertyManager::propertyChanged, &QtIntPropertyManager::valueChanged, &QtIntPropertyManager::rangeChanged, @@ -797,7 +795,7 @@ void QtIntPropertyManager::setMinimum(QtProperty *property, int minVal) */ void QtIntPropertyManager::setMaximum(QtProperty *property, int maxVal) { - setMaximumValue<int, QtIntPropertyManagerPrivate, QtIntPropertyManager, int, QtIntPropertyManagerPrivate::Data>(this, d_ptr, + setMaximumValue<int, QtIntPropertyManagerPrivate, QtIntPropertyManager, int, QtIntPropertyManagerPrivate::Data>(this, d_ptr.data(), &QtIntPropertyManager::propertyChanged, &QtIntPropertyManager::valueChanged, &QtIntPropertyManager::rangeChanged, @@ -821,7 +819,7 @@ void QtIntPropertyManager::setMaximum(QtProperty *property, int maxVal) void QtIntPropertyManager::setRange(QtProperty *property, int minVal, int maxVal) { void (QtIntPropertyManagerPrivate::*setSubPropertyRange)(QtProperty *, int, int, int) = 0; - setBorderValues<int, QtIntPropertyManagerPrivate, QtIntPropertyManager, int>(this, d_ptr, + setBorderValues<int, QtIntPropertyManagerPrivate, QtIntPropertyManager, int>(this, d_ptr.data(), &QtIntPropertyManager::propertyChanged, &QtIntPropertyManager::valueChanged, &QtIntPropertyManager::rangeChanged, @@ -968,9 +966,8 @@ public: Creates a manager with the given \a parent. */ QtDoublePropertyManager::QtDoublePropertyManager(QObject *parent) - : QtAbstractPropertyManager(parent) + : QtAbstractPropertyManager(parent), d_ptr(new QtDoublePropertyManagerPrivate) { - d_ptr = new QtDoublePropertyManagerPrivate; d_ptr->q_ptr = this; } @@ -980,7 +977,6 @@ QtDoublePropertyManager::QtDoublePropertyManager(QObject *parent) QtDoublePropertyManager::~QtDoublePropertyManager() { clear(); - delete d_ptr; } /*! @@ -1063,7 +1059,7 @@ QString QtDoublePropertyManager::valueText(const QtProperty *property) const void QtDoublePropertyManager::setValue(QtProperty *property, double val) { void (QtDoublePropertyManagerPrivate::*setSubPropertyValue)(QtProperty *, double) = 0; - setValueInRange<double, QtDoublePropertyManagerPrivate, QtDoublePropertyManager, double>(this, d_ptr, + setValueInRange<double, QtDoublePropertyManagerPrivate, QtDoublePropertyManager, double>(this, d_ptr.data(), &QtDoublePropertyManager::propertyChanged, &QtDoublePropertyManager::valueChanged, property, val, setSubPropertyValue); @@ -1140,7 +1136,7 @@ void QtDoublePropertyManager::setDecimals(QtProperty *property, int prec) */ void QtDoublePropertyManager::setMinimum(QtProperty *property, double minVal) { - setMinimumValue<double, QtDoublePropertyManagerPrivate, QtDoublePropertyManager, double, QtDoublePropertyManagerPrivate::Data>(this, d_ptr, + setMinimumValue<double, QtDoublePropertyManagerPrivate, QtDoublePropertyManager, double, QtDoublePropertyManagerPrivate::Data>(this, d_ptr.data(), &QtDoublePropertyManager::propertyChanged, &QtDoublePropertyManager::valueChanged, &QtDoublePropertyManager::rangeChanged, @@ -1158,7 +1154,7 @@ void QtDoublePropertyManager::setMinimum(QtProperty *property, double minVal) */ void QtDoublePropertyManager::setMaximum(QtProperty *property, double maxVal) { - setMaximumValue<double, QtDoublePropertyManagerPrivate, QtDoublePropertyManager, double, QtDoublePropertyManagerPrivate::Data>(this, d_ptr, + setMaximumValue<double, QtDoublePropertyManagerPrivate, QtDoublePropertyManager, double, QtDoublePropertyManagerPrivate::Data>(this, d_ptr.data(), &QtDoublePropertyManager::propertyChanged, &QtDoublePropertyManager::valueChanged, &QtDoublePropertyManager::rangeChanged, @@ -1182,7 +1178,7 @@ void QtDoublePropertyManager::setMaximum(QtProperty *property, double maxVal) void QtDoublePropertyManager::setRange(QtProperty *property, double minVal, double maxVal) { void (QtDoublePropertyManagerPrivate::*setSubPropertyRange)(QtProperty *, double, double, double) = 0; - setBorderValues<double, QtDoublePropertyManagerPrivate, QtDoublePropertyManager, double>(this, d_ptr, + setBorderValues<double, QtDoublePropertyManagerPrivate, QtDoublePropertyManager, double>(this, d_ptr.data(), &QtDoublePropertyManager::propertyChanged, &QtDoublePropertyManager::valueChanged, &QtDoublePropertyManager::rangeChanged, @@ -1273,9 +1269,8 @@ public: Creates a manager with the given \a parent. */ QtStringPropertyManager::QtStringPropertyManager(QObject *parent) - : QtAbstractPropertyManager(parent) + : QtAbstractPropertyManager(parent), d_ptr(new QtStringPropertyManagerPrivate) { - d_ptr = new QtStringPropertyManagerPrivate; d_ptr->q_ptr = this; } @@ -1285,7 +1280,6 @@ QtStringPropertyManager::QtStringPropertyManager(QObject *parent) QtStringPropertyManager::~QtStringPropertyManager() { clear(); - delete d_ptr; } /*! @@ -1437,9 +1431,8 @@ public: Creates a manager with the given \a parent. */ QtBoolPropertyManager::QtBoolPropertyManager(QObject *parent) - : QtAbstractPropertyManager(parent) + : QtAbstractPropertyManager(parent), d_ptr(new QtBoolPropertyManagerPrivate) { - d_ptr = new QtBoolPropertyManagerPrivate; d_ptr->q_ptr = this; } @@ -1449,7 +1442,6 @@ QtBoolPropertyManager::QtBoolPropertyManager(QObject *parent) QtBoolPropertyManager::~QtBoolPropertyManager() { clear(); - delete d_ptr; } /*! @@ -1630,9 +1622,8 @@ public: Creates a manager with the given \a parent. */ QtDatePropertyManager::QtDatePropertyManager(QObject *parent) - : QtAbstractPropertyManager(parent) + : QtAbstractPropertyManager(parent), d_ptr(new QtDatePropertyManagerPrivate) { - d_ptr = new QtDatePropertyManagerPrivate; d_ptr->q_ptr = this; QLocale loc; @@ -1645,7 +1636,6 @@ QtDatePropertyManager::QtDatePropertyManager(QObject *parent) QtDatePropertyManager::~QtDatePropertyManager() { clear(); - delete d_ptr; } /*! @@ -1706,7 +1696,7 @@ QString QtDatePropertyManager::valueText(const QtProperty *property) const void QtDatePropertyManager::setValue(QtProperty *property, const QDate &val) { void (QtDatePropertyManagerPrivate::*setSubPropertyValue)(QtProperty *, const QDate &) = 0; - setValueInRange<const QDate &, QtDatePropertyManagerPrivate, QtDatePropertyManager, const QDate>(this, d_ptr, + setValueInRange<const QDate &, QtDatePropertyManagerPrivate, QtDatePropertyManager, const QDate>(this, d_ptr.data(), &QtDatePropertyManager::propertyChanged, &QtDatePropertyManager::valueChanged, property, val, setSubPropertyValue); @@ -1723,7 +1713,7 @@ void QtDatePropertyManager::setValue(QtProperty *property, const QDate &val) */ void QtDatePropertyManager::setMinimum(QtProperty *property, const QDate &minVal) { - setMinimumValue<const QDate &, QtDatePropertyManagerPrivate, QtDatePropertyManager, QDate, QtDatePropertyManagerPrivate::Data>(this, d_ptr, + setMinimumValue<const QDate &, QtDatePropertyManagerPrivate, QtDatePropertyManager, QDate, QtDatePropertyManagerPrivate::Data>(this, d_ptr.data(), &QtDatePropertyManager::propertyChanged, &QtDatePropertyManager::valueChanged, &QtDatePropertyManager::rangeChanged, @@ -1741,7 +1731,7 @@ void QtDatePropertyManager::setMinimum(QtProperty *property, const QDate &minVal */ void QtDatePropertyManager::setMaximum(QtProperty *property, const QDate &maxVal) { - setMaximumValue<const QDate &, QtDatePropertyManagerPrivate, QtDatePropertyManager, QDate, QtDatePropertyManagerPrivate::Data>(this, d_ptr, + setMaximumValue<const QDate &, QtDatePropertyManagerPrivate, QtDatePropertyManager, QDate, QtDatePropertyManagerPrivate::Data>(this, d_ptr.data(), &QtDatePropertyManager::propertyChanged, &QtDatePropertyManager::valueChanged, &QtDatePropertyManager::rangeChanged, @@ -1766,7 +1756,7 @@ void QtDatePropertyManager::setRange(QtProperty *property, const QDate &minVal, { void (QtDatePropertyManagerPrivate::*setSubPropertyRange)(QtProperty *, const QDate &, const QDate &, const QDate &) = 0; - setBorderValues<const QDate &, QtDatePropertyManagerPrivate, QtDatePropertyManager, QDate>(this, d_ptr, + setBorderValues<const QDate &, QtDatePropertyManagerPrivate, QtDatePropertyManager, QDate>(this, d_ptr.data(), &QtDatePropertyManager::propertyChanged, &QtDatePropertyManager::valueChanged, &QtDatePropertyManager::rangeChanged, @@ -1835,9 +1825,8 @@ public: Creates a manager with the given \a parent. */ QtTimePropertyManager::QtTimePropertyManager(QObject *parent) - : QtAbstractPropertyManager(parent) + : QtAbstractPropertyManager(parent), d_ptr(new QtTimePropertyManagerPrivate) { - d_ptr = new QtTimePropertyManagerPrivate; d_ptr->q_ptr = this; QLocale loc; @@ -1850,7 +1839,6 @@ QtTimePropertyManager::QtTimePropertyManager(QObject *parent) QtTimePropertyManager::~QtTimePropertyManager() { clear(); - delete d_ptr; } /*! @@ -1950,9 +1938,8 @@ public: Creates a manager with the given \a parent. */ QtDateTimePropertyManager::QtDateTimePropertyManager(QObject *parent) - : QtAbstractPropertyManager(parent) + : QtAbstractPropertyManager(parent), d_ptr(new QtDateTimePropertyManagerPrivate) { - d_ptr = new QtDateTimePropertyManagerPrivate; d_ptr->q_ptr = this; QLocale loc; @@ -1967,7 +1954,6 @@ QtDateTimePropertyManager::QtDateTimePropertyManager(QObject *parent) QtDateTimePropertyManager::~QtDateTimePropertyManager() { clear(); - delete d_ptr; } /*! @@ -2068,9 +2054,8 @@ public: Creates a manager with the given \a parent. */ QtKeySequencePropertyManager::QtKeySequencePropertyManager(QObject *parent) - : QtAbstractPropertyManager(parent) + : QtAbstractPropertyManager(parent), d_ptr(new QtKeySequencePropertyManagerPrivate) { - d_ptr = new QtKeySequencePropertyManagerPrivate; d_ptr->q_ptr = this; } @@ -2080,7 +2065,6 @@ QtKeySequencePropertyManager::QtKeySequencePropertyManager(QObject *parent) QtKeySequencePropertyManager::~QtKeySequencePropertyManager() { clear(); - delete d_ptr; } /*! @@ -2179,9 +2163,8 @@ public: Creates a manager with the given \a parent. */ QtCharPropertyManager::QtCharPropertyManager(QObject *parent) - : QtAbstractPropertyManager(parent) + : QtAbstractPropertyManager(parent), d_ptr(new QtCharPropertyManagerPrivate) { - d_ptr = new QtCharPropertyManagerPrivate; d_ptr->q_ptr = this; } @@ -2191,7 +2174,6 @@ QtCharPropertyManager::QtCharPropertyManager(QObject *parent) QtCharPropertyManager::~QtCharPropertyManager() { clear(); - delete d_ptr; } /*! @@ -2347,9 +2329,8 @@ void QtLocalePropertyManagerPrivate::slotPropertyDestroyed(QtProperty *property) Creates a manager with the given \a parent. */ QtLocalePropertyManager::QtLocalePropertyManager(QObject *parent) - : QtAbstractPropertyManager(parent) + : QtAbstractPropertyManager(parent), d_ptr(new QtLocalePropertyManagerPrivate) { - d_ptr = new QtLocalePropertyManagerPrivate; d_ptr->q_ptr = this; d_ptr->m_enumPropertyManager = new QtEnumPropertyManager(this); @@ -2366,7 +2347,6 @@ QtLocalePropertyManager::QtLocalePropertyManager(QObject *parent) QtLocalePropertyManager::~QtLocalePropertyManager() { clear(); - delete d_ptr; } /*! @@ -2586,9 +2566,8 @@ void QtPointPropertyManagerPrivate::slotPropertyDestroyed(QtProperty *property) Creates a manager with the given \a parent. */ QtPointPropertyManager::QtPointPropertyManager(QObject *parent) - : QtAbstractPropertyManager(parent) + : QtAbstractPropertyManager(parent), d_ptr(new QtPointPropertyManagerPrivate) { - d_ptr = new QtPointPropertyManagerPrivate; d_ptr->q_ptr = this; d_ptr->m_intPropertyManager = new QtIntPropertyManager(this); @@ -2604,7 +2583,6 @@ QtPointPropertyManager::QtPointPropertyManager(QObject *parent) QtPointPropertyManager::~QtPointPropertyManager() { clear(); - delete d_ptr; } /*! @@ -2818,9 +2796,8 @@ void QtPointFPropertyManagerPrivate::slotPropertyDestroyed(QtProperty *property) Creates a manager with the given \a parent. */ QtPointFPropertyManager::QtPointFPropertyManager(QObject *parent) - : QtAbstractPropertyManager(parent) + : QtAbstractPropertyManager(parent), d_ptr(new QtPointFPropertyManagerPrivate) { - d_ptr = new QtPointFPropertyManagerPrivate; d_ptr->q_ptr = this; d_ptr->m_doublePropertyManager = new QtDoublePropertyManager(this); @@ -2836,7 +2813,6 @@ QtPointFPropertyManager::QtPointFPropertyManager(QObject *parent) QtPointFPropertyManager::~QtPointFPropertyManager() { clear(); - delete d_ptr; } /*! @@ -3131,9 +3107,8 @@ void QtSizePropertyManagerPrivate::setRange(QtProperty *property, Creates a manager with the given \a parent. */ QtSizePropertyManager::QtSizePropertyManager(QObject *parent) - : QtAbstractPropertyManager(parent) + : QtAbstractPropertyManager(parent), d_ptr(new QtSizePropertyManagerPrivate) { - d_ptr = new QtSizePropertyManagerPrivate; d_ptr->q_ptr = this; d_ptr->m_intPropertyManager = new QtIntPropertyManager(this); @@ -3149,7 +3124,6 @@ QtSizePropertyManager::QtSizePropertyManager(QObject *parent) QtSizePropertyManager::~QtSizePropertyManager() { clear(); - delete d_ptr; } /*! @@ -3226,7 +3200,7 @@ QString QtSizePropertyManager::valueText(const QtProperty *property) const */ void QtSizePropertyManager::setValue(QtProperty *property, const QSize &val) { - setValueInRange<const QSize &, QtSizePropertyManagerPrivate, QtSizePropertyManager, const QSize>(this, d_ptr, + setValueInRange<const QSize &, QtSizePropertyManagerPrivate, QtSizePropertyManager, const QSize>(this, d_ptr.data(), &QtSizePropertyManager::propertyChanged, &QtSizePropertyManager::valueChanged, property, val, &QtSizePropertyManagerPrivate::setValue); @@ -3243,7 +3217,7 @@ void QtSizePropertyManager::setValue(QtProperty *property, const QSize &val) */ void QtSizePropertyManager::setMinimum(QtProperty *property, const QSize &minVal) { - setBorderValue<const QSize &, QtSizePropertyManagerPrivate, QtSizePropertyManager, QSize, QtSizePropertyManagerPrivate::Data>(this, d_ptr, + setBorderValue<const QSize &, QtSizePropertyManagerPrivate, QtSizePropertyManager, QSize, QtSizePropertyManagerPrivate::Data>(this, d_ptr.data(), &QtSizePropertyManager::propertyChanged, &QtSizePropertyManager::valueChanged, &QtSizePropertyManager::rangeChanged, @@ -3264,7 +3238,7 @@ void QtSizePropertyManager::setMinimum(QtProperty *property, const QSize &minVal */ void QtSizePropertyManager::setMaximum(QtProperty *property, const QSize &maxVal) { - setBorderValue<const QSize &, QtSizePropertyManagerPrivate, QtSizePropertyManager, QSize, QtSizePropertyManagerPrivate::Data>(this, d_ptr, + setBorderValue<const QSize &, QtSizePropertyManagerPrivate, QtSizePropertyManager, QSize, QtSizePropertyManagerPrivate::Data>(this, d_ptr.data(), &QtSizePropertyManager::propertyChanged, &QtSizePropertyManager::valueChanged, &QtSizePropertyManager::rangeChanged, @@ -3290,7 +3264,7 @@ void QtSizePropertyManager::setMaximum(QtProperty *property, const QSize &maxVal */ void QtSizePropertyManager::setRange(QtProperty *property, const QSize &minVal, const QSize &maxVal) { - setBorderValues<const QSize &, QtSizePropertyManagerPrivate, QtSizePropertyManager, QSize>(this, d_ptr, + setBorderValues<const QSize &, QtSizePropertyManagerPrivate, QtSizePropertyManager, QSize>(this, d_ptr.data(), &QtSizePropertyManager::propertyChanged, &QtSizePropertyManager::valueChanged, &QtSizePropertyManager::rangeChanged, @@ -3487,9 +3461,8 @@ void QtSizeFPropertyManagerPrivate::setRange(QtProperty *property, Creates a manager with the given \a parent. */ QtSizeFPropertyManager::QtSizeFPropertyManager(QObject *parent) - : QtAbstractPropertyManager(parent) + : QtAbstractPropertyManager(parent), d_ptr(new QtSizeFPropertyManagerPrivate) { - d_ptr = new QtSizeFPropertyManagerPrivate; d_ptr->q_ptr = this; d_ptr->m_doublePropertyManager = new QtDoublePropertyManager(this); @@ -3505,7 +3478,6 @@ QtSizeFPropertyManager::QtSizeFPropertyManager(QObject *parent) QtSizeFPropertyManager::~QtSizeFPropertyManager() { clear(); - delete d_ptr; } /*! @@ -3593,7 +3565,7 @@ QString QtSizeFPropertyManager::valueText(const QtProperty *property) const */ void QtSizeFPropertyManager::setValue(QtProperty *property, const QSizeF &val) { - setValueInRange<const QSizeF &, QtSizeFPropertyManagerPrivate, QtSizeFPropertyManager, QSizeF>(this, d_ptr, + setValueInRange<const QSizeF &, QtSizeFPropertyManagerPrivate, QtSizeFPropertyManager, QSizeF>(this, d_ptr.data(), &QtSizeFPropertyManager::propertyChanged, &QtSizeFPropertyManager::valueChanged, property, val, &QtSizeFPropertyManagerPrivate::setValue); @@ -3644,7 +3616,7 @@ void QtSizeFPropertyManager::setDecimals(QtProperty *property, int prec) */ void QtSizeFPropertyManager::setMinimum(QtProperty *property, const QSizeF &minVal) { - setBorderValue<const QSizeF &, QtSizeFPropertyManagerPrivate, QtSizeFPropertyManager, QSizeF, QtSizeFPropertyManagerPrivate::Data>(this, d_ptr, + setBorderValue<const QSizeF &, QtSizeFPropertyManagerPrivate, QtSizeFPropertyManager, QSizeF, QtSizeFPropertyManagerPrivate::Data>(this, d_ptr.data(), &QtSizeFPropertyManager::propertyChanged, &QtSizeFPropertyManager::valueChanged, &QtSizeFPropertyManager::rangeChanged, @@ -3665,7 +3637,7 @@ void QtSizeFPropertyManager::setMinimum(QtProperty *property, const QSizeF &minV */ void QtSizeFPropertyManager::setMaximum(QtProperty *property, const QSizeF &maxVal) { - setBorderValue<const QSizeF &, QtSizeFPropertyManagerPrivate, QtSizeFPropertyManager, QSizeF, QtSizeFPropertyManagerPrivate::Data>(this, d_ptr, + setBorderValue<const QSizeF &, QtSizeFPropertyManagerPrivate, QtSizeFPropertyManager, QSizeF, QtSizeFPropertyManagerPrivate::Data>(this, d_ptr.data(), &QtSizeFPropertyManager::propertyChanged, &QtSizeFPropertyManager::valueChanged, &QtSizeFPropertyManager::rangeChanged, @@ -3691,7 +3663,7 @@ void QtSizeFPropertyManager::setMaximum(QtProperty *property, const QSizeF &maxV */ void QtSizeFPropertyManager::setRange(QtProperty *property, const QSizeF &minVal, const QSizeF &maxVal) { - setBorderValues<const QSizeF &, QtSizeFPropertyManagerPrivate, QtSizeFPropertyManager, QSizeF>(this, d_ptr, + setBorderValues<const QSizeF &, QtSizeFPropertyManagerPrivate, QtSizeFPropertyManager, QSizeF>(this, d_ptr.data(), &QtSizeFPropertyManager::propertyChanged, &QtSizeFPropertyManager::valueChanged, &QtSizeFPropertyManager::rangeChanged, @@ -3903,9 +3875,8 @@ void QtRectPropertyManagerPrivate::setConstraint(QtProperty *property, Creates a manager with the given \a parent. */ QtRectPropertyManager::QtRectPropertyManager(QObject *parent) - : QtAbstractPropertyManager(parent) + : QtAbstractPropertyManager(parent), d_ptr(new QtRectPropertyManagerPrivate) { - d_ptr = new QtRectPropertyManagerPrivate; d_ptr->q_ptr = this; d_ptr->m_intPropertyManager = new QtIntPropertyManager(this); @@ -3921,7 +3892,6 @@ QtRectPropertyManager::QtRectPropertyManager(QObject *parent) QtRectPropertyManager::~QtRectPropertyManager() { clear(); - delete d_ptr; } /*! @@ -4325,9 +4295,8 @@ void QtRectFPropertyManagerPrivate::setConstraint(QtProperty *property, Creates a manager with the given \a parent. */ QtRectFPropertyManager::QtRectFPropertyManager(QObject *parent) - : QtAbstractPropertyManager(parent) + : QtAbstractPropertyManager(parent), d_ptr(new QtRectFPropertyManagerPrivate) { - d_ptr = new QtRectFPropertyManagerPrivate; d_ptr->q_ptr = this; d_ptr->m_doublePropertyManager = new QtDoublePropertyManager(this); @@ -4343,7 +4312,6 @@ QtRectFPropertyManager::QtRectFPropertyManager(QObject *parent) QtRectFPropertyManager::~QtRectFPropertyManager() { clear(); - delete d_ptr; } /*! @@ -4710,9 +4678,8 @@ public: Creates a manager with the given \a parent. */ QtEnumPropertyManager::QtEnumPropertyManager(QObject *parent) - : QtAbstractPropertyManager(parent) + : QtAbstractPropertyManager(parent), d_ptr(new QtEnumPropertyManagerPrivate) { - d_ptr = new QtEnumPropertyManagerPrivate; d_ptr->q_ptr = this; } @@ -4722,7 +4689,6 @@ QtEnumPropertyManager::QtEnumPropertyManager(QObject *parent) QtEnumPropertyManager::~QtEnumPropertyManager() { clear(); - delete d_ptr; } /*! @@ -5022,9 +4988,8 @@ void QtFlagPropertyManagerPrivate::slotPropertyDestroyed(QtProperty *property) Creates a manager with the given \a parent. */ QtFlagPropertyManager::QtFlagPropertyManager(QObject *parent) - : QtAbstractPropertyManager(parent) + : QtAbstractPropertyManager(parent), d_ptr(new QtFlagPropertyManagerPrivate) { - d_ptr = new QtFlagPropertyManagerPrivate; d_ptr->q_ptr = this; d_ptr->m_boolPropertyManager = new QtBoolPropertyManager(this); @@ -5040,7 +5005,6 @@ QtFlagPropertyManager::QtFlagPropertyManager(QObject *parent) QtFlagPropertyManager::~QtFlagPropertyManager() { clear(); - delete d_ptr; } /*! @@ -5350,9 +5314,8 @@ void QtSizePolicyPropertyManagerPrivate::slotPropertyDestroyed(QtProperty *prope Creates a manager with the given \a parent. */ QtSizePolicyPropertyManager::QtSizePolicyPropertyManager(QObject *parent) - : QtAbstractPropertyManager(parent) + : QtAbstractPropertyManager(parent), d_ptr(new QtSizePolicyPropertyManagerPrivate) { - d_ptr = new QtSizePolicyPropertyManagerPrivate; d_ptr->q_ptr = this; d_ptr->m_intPropertyManager = new QtIntPropertyManager(this); @@ -5374,7 +5337,6 @@ QtSizePolicyPropertyManager::QtSizePolicyPropertyManager(QObject *parent) QtSizePolicyPropertyManager::~QtSizePolicyPropertyManager() { clear(); - delete d_ptr; } /*! @@ -5762,9 +5724,8 @@ void QtFontPropertyManagerPrivate::slotFontDatabaseDelayedChange() Creates a manager with the given \a parent. */ QtFontPropertyManager::QtFontPropertyManager(QObject *parent) - : QtAbstractPropertyManager(parent) + : QtAbstractPropertyManager(parent), d_ptr(new QtFontPropertyManagerPrivate) { - d_ptr = new QtFontPropertyManagerPrivate; d_ptr->q_ptr = this; QObject::connect(qApp, SIGNAL(fontDatabaseChanged()), this, SLOT(slotFontDatabaseChanged())); @@ -5792,7 +5753,6 @@ QtFontPropertyManager::QtFontPropertyManager(QObject *parent) QtFontPropertyManager::~QtFontPropertyManager() { clear(); - delete d_ptr; } /*! @@ -6140,9 +6100,8 @@ void QtColorPropertyManagerPrivate::slotPropertyDestroyed(QtProperty *property) Creates a manager with the given \a parent. */ QtColorPropertyManager::QtColorPropertyManager(QObject *parent) - : QtAbstractPropertyManager(parent) + : QtAbstractPropertyManager(parent), d_ptr(new QtColorPropertyManagerPrivate) { - d_ptr = new QtColorPropertyManagerPrivate; d_ptr->q_ptr = this; d_ptr->m_intPropertyManager = new QtIntPropertyManager(this); @@ -6159,7 +6118,6 @@ QtColorPropertyManager::QtColorPropertyManager(QObject *parent) QtColorPropertyManager::~QtColorPropertyManager() { clear(); - delete d_ptr; } /*! @@ -6364,9 +6322,8 @@ public: Creates a manager with the given \a parent. */ QtCursorPropertyManager::QtCursorPropertyManager(QObject *parent) - : QtAbstractPropertyManager(parent) + : QtAbstractPropertyManager(parent), d_ptr(new QtCursorPropertyManagerPrivate) { - d_ptr = new QtCursorPropertyManagerPrivate; d_ptr->q_ptr = this; } @@ -6376,7 +6333,6 @@ QtCursorPropertyManager::QtCursorPropertyManager(QObject *parent) QtCursorPropertyManager::~QtCursorPropertyManager() { clear(); - delete d_ptr; } /*! diff --git a/tools/shared/qtpropertybrowser/qtpropertymanager.h b/tools/shared/qtpropertybrowser/qtpropertymanager.h index 5e60de0..31c308e 100644 --- a/tools/shared/qtpropertybrowser/qtpropertymanager.h +++ b/tools/shared/qtpropertybrowser/qtpropertymanager.h @@ -94,7 +94,7 @@ protected: virtual void initializeProperty(QtProperty *property); virtual void uninitializeProperty(QtProperty *property); private: - QtIntPropertyManagerPrivate *d_ptr; + QScopedPointer<QtIntPropertyManagerPrivate> d_ptr; Q_DECLARE_PRIVATE(QtIntPropertyManager) Q_DISABLE_COPY(QtIntPropertyManager) }; @@ -120,7 +120,7 @@ protected: virtual void initializeProperty(QtProperty *property); virtual void uninitializeProperty(QtProperty *property); private: - QtBoolPropertyManagerPrivate *d_ptr; + QScopedPointer<QtBoolPropertyManagerPrivate> d_ptr; Q_DECLARE_PRIVATE(QtBoolPropertyManager) Q_DISABLE_COPY(QtBoolPropertyManager) }; @@ -157,7 +157,7 @@ protected: virtual void initializeProperty(QtProperty *property); virtual void uninitializeProperty(QtProperty *property); private: - QtDoublePropertyManagerPrivate *d_ptr; + QScopedPointer<QtDoublePropertyManagerPrivate> d_ptr; Q_DECLARE_PRIVATE(QtDoublePropertyManager) Q_DISABLE_COPY(QtDoublePropertyManager) }; @@ -185,7 +185,7 @@ protected: virtual void initializeProperty(QtProperty *property); virtual void uninitializeProperty(QtProperty *property); private: - QtStringPropertyManagerPrivate *d_ptr; + QScopedPointer<QtStringPropertyManagerPrivate> d_ptr; Q_DECLARE_PRIVATE(QtStringPropertyManager) Q_DISABLE_COPY(QtStringPropertyManager) }; @@ -216,7 +216,7 @@ protected: virtual void initializeProperty(QtProperty *property); virtual void uninitializeProperty(QtProperty *property); private: - QtDatePropertyManagerPrivate *d_ptr; + QScopedPointer<QtDatePropertyManagerPrivate> d_ptr; Q_DECLARE_PRIVATE(QtDatePropertyManager) Q_DISABLE_COPY(QtDatePropertyManager) }; @@ -241,7 +241,7 @@ protected: virtual void initializeProperty(QtProperty *property); virtual void uninitializeProperty(QtProperty *property); private: - QtTimePropertyManagerPrivate *d_ptr; + QScopedPointer<QtTimePropertyManagerPrivate> d_ptr; Q_DECLARE_PRIVATE(QtTimePropertyManager) Q_DISABLE_COPY(QtTimePropertyManager) }; @@ -266,7 +266,7 @@ protected: virtual void initializeProperty(QtProperty *property); virtual void uninitializeProperty(QtProperty *property); private: - QtDateTimePropertyManagerPrivate *d_ptr; + QScopedPointer<QtDateTimePropertyManagerPrivate> d_ptr; Q_DECLARE_PRIVATE(QtDateTimePropertyManager) Q_DISABLE_COPY(QtDateTimePropertyManager) }; @@ -291,7 +291,7 @@ protected: virtual void initializeProperty(QtProperty *property); virtual void uninitializeProperty(QtProperty *property); private: - QtKeySequencePropertyManagerPrivate *d_ptr; + QScopedPointer<QtKeySequencePropertyManagerPrivate> d_ptr; Q_DECLARE_PRIVATE(QtKeySequencePropertyManager) Q_DISABLE_COPY(QtKeySequencePropertyManager) }; @@ -316,7 +316,7 @@ protected: virtual void initializeProperty(QtProperty *property); virtual void uninitializeProperty(QtProperty *property); private: - QtCharPropertyManagerPrivate *d_ptr; + QScopedPointer<QtCharPropertyManagerPrivate> d_ptr; Q_DECLARE_PRIVATE(QtCharPropertyManager) Q_DISABLE_COPY(QtCharPropertyManager) }; @@ -344,7 +344,7 @@ protected: virtual void initializeProperty(QtProperty *property); virtual void uninitializeProperty(QtProperty *property); private: - QtLocalePropertyManagerPrivate *d_ptr; + QScopedPointer<QtLocalePropertyManagerPrivate> d_ptr; Q_DECLARE_PRIVATE(QtLocalePropertyManager) Q_DISABLE_COPY(QtLocalePropertyManager) Q_PRIVATE_SLOT(d_func(), void slotEnumChanged(QtProperty *, int)) @@ -373,7 +373,7 @@ protected: virtual void initializeProperty(QtProperty *property); virtual void uninitializeProperty(QtProperty *property); private: - QtPointPropertyManagerPrivate *d_ptr; + QScopedPointer<QtPointPropertyManagerPrivate> d_ptr; Q_DECLARE_PRIVATE(QtPointPropertyManager) Q_DISABLE_COPY(QtPointPropertyManager) Q_PRIVATE_SLOT(d_func(), void slotIntChanged(QtProperty *, int)) @@ -405,7 +405,7 @@ protected: virtual void initializeProperty(QtProperty *property); virtual void uninitializeProperty(QtProperty *property); private: - QtPointFPropertyManagerPrivate *d_ptr; + QScopedPointer<QtPointFPropertyManagerPrivate> d_ptr; Q_DECLARE_PRIVATE(QtPointFPropertyManager) Q_DISABLE_COPY(QtPointFPropertyManager) Q_PRIVATE_SLOT(d_func(), void slotDoubleChanged(QtProperty *, double)) @@ -440,7 +440,7 @@ protected: virtual void initializeProperty(QtProperty *property); virtual void uninitializeProperty(QtProperty *property); private: - QtSizePropertyManagerPrivate *d_ptr; + QScopedPointer<QtSizePropertyManagerPrivate> d_ptr; Q_DECLARE_PRIVATE(QtSizePropertyManager) Q_DISABLE_COPY(QtSizePropertyManager) Q_PRIVATE_SLOT(d_func(), void slotIntChanged(QtProperty *, int)) @@ -478,7 +478,7 @@ protected: virtual void initializeProperty(QtProperty *property); virtual void uninitializeProperty(QtProperty *property); private: - QtSizeFPropertyManagerPrivate *d_ptr; + QScopedPointer<QtSizeFPropertyManagerPrivate> d_ptr; Q_DECLARE_PRIVATE(QtSizeFPropertyManager) Q_DISABLE_COPY(QtSizeFPropertyManager) Q_PRIVATE_SLOT(d_func(), void slotDoubleChanged(QtProperty *, double)) @@ -510,7 +510,7 @@ protected: virtual void initializeProperty(QtProperty *property); virtual void uninitializeProperty(QtProperty *property); private: - QtRectPropertyManagerPrivate *d_ptr; + QScopedPointer<QtRectPropertyManagerPrivate> d_ptr; Q_DECLARE_PRIVATE(QtRectPropertyManager) Q_DISABLE_COPY(QtRectPropertyManager) Q_PRIVATE_SLOT(d_func(), void slotIntChanged(QtProperty *, int)) @@ -545,7 +545,7 @@ protected: virtual void initializeProperty(QtProperty *property); virtual void uninitializeProperty(QtProperty *property); private: - QtRectFPropertyManagerPrivate *d_ptr; + QScopedPointer<QtRectFPropertyManagerPrivate> d_ptr; Q_DECLARE_PRIVATE(QtRectFPropertyManager) Q_DISABLE_COPY(QtRectFPropertyManager) Q_PRIVATE_SLOT(d_func(), void slotDoubleChanged(QtProperty *, double)) @@ -579,7 +579,7 @@ protected: virtual void initializeProperty(QtProperty *property); virtual void uninitializeProperty(QtProperty *property); private: - QtEnumPropertyManagerPrivate *d_ptr; + QScopedPointer<QtEnumPropertyManagerPrivate> d_ptr; Q_DECLARE_PRIVATE(QtEnumPropertyManager) Q_DISABLE_COPY(QtEnumPropertyManager) }; @@ -609,7 +609,7 @@ protected: virtual void initializeProperty(QtProperty *property); virtual void uninitializeProperty(QtProperty *property); private: - QtFlagPropertyManagerPrivate *d_ptr; + QScopedPointer<QtFlagPropertyManagerPrivate> d_ptr; Q_DECLARE_PRIVATE(QtFlagPropertyManager) Q_DISABLE_COPY(QtFlagPropertyManager) Q_PRIVATE_SLOT(d_func(), void slotBoolChanged(QtProperty *, bool)) @@ -639,7 +639,7 @@ protected: virtual void initializeProperty(QtProperty *property); virtual void uninitializeProperty(QtProperty *property); private: - QtSizePolicyPropertyManagerPrivate *d_ptr; + QScopedPointer<QtSizePolicyPropertyManagerPrivate> d_ptr; Q_DECLARE_PRIVATE(QtSizePolicyPropertyManager) Q_DISABLE_COPY(QtSizePolicyPropertyManager) Q_PRIVATE_SLOT(d_func(), void slotIntChanged(QtProperty *, int)) @@ -672,7 +672,7 @@ protected: virtual void initializeProperty(QtProperty *property); virtual void uninitializeProperty(QtProperty *property); private: - QtFontPropertyManagerPrivate *d_ptr; + QScopedPointer<QtFontPropertyManagerPrivate> d_ptr; Q_DECLARE_PRIVATE(QtFontPropertyManager) Q_DISABLE_COPY(QtFontPropertyManager) Q_PRIVATE_SLOT(d_func(), void slotIntChanged(QtProperty *, int)) @@ -706,7 +706,7 @@ protected: virtual void initializeProperty(QtProperty *property); virtual void uninitializeProperty(QtProperty *property); private: - QtColorPropertyManagerPrivate *d_ptr; + QScopedPointer<QtColorPropertyManagerPrivate> d_ptr; Q_DECLARE_PRIVATE(QtColorPropertyManager) Q_DISABLE_COPY(QtColorPropertyManager) Q_PRIVATE_SLOT(d_func(), void slotIntChanged(QtProperty *, int)) @@ -736,7 +736,7 @@ protected: virtual void initializeProperty(QtProperty *property); virtual void uninitializeProperty(QtProperty *property); private: - QtCursorPropertyManagerPrivate *d_ptr; + QScopedPointer<QtCursorPropertyManagerPrivate> d_ptr; Q_DECLARE_PRIVATE(QtCursorPropertyManager) Q_DISABLE_COPY(QtCursorPropertyManager) }; diff --git a/tools/shared/qtpropertybrowser/qttreepropertybrowser.cpp b/tools/shared/qtpropertybrowser/qttreepropertybrowser.cpp index 950272c..51416a8 100644 --- a/tools/shared/qtpropertybrowser/qttreepropertybrowser.cpp +++ b/tools/shared/qtpropertybrowser/qttreepropertybrowser.cpp @@ -726,9 +726,8 @@ void QtTreePropertyBrowserPrivate::editItem(QtBrowserItem *browserItem) Creates a property browser with the given \a parent. */ QtTreePropertyBrowser::QtTreePropertyBrowser(QWidget *parent) - : QtAbstractPropertyBrowser(parent) + : QtAbstractPropertyBrowser(parent), d_ptr(new QtTreePropertyBrowserPrivate) { - d_ptr = new QtTreePropertyBrowserPrivate; d_ptr->q_ptr = this; d_ptr->init(this); @@ -747,7 +746,6 @@ QtTreePropertyBrowser::QtTreePropertyBrowser(QWidget *parent) */ QtTreePropertyBrowser::~QtTreePropertyBrowser() { - delete d_ptr; } /*! diff --git a/tools/shared/qtpropertybrowser/qttreepropertybrowser.h b/tools/shared/qtpropertybrowser/qttreepropertybrowser.h index c83d36c..ebcf185 100644 --- a/tools/shared/qtpropertybrowser/qttreepropertybrowser.h +++ b/tools/shared/qtpropertybrowser/qttreepropertybrowser.h @@ -118,7 +118,7 @@ protected: private: - QtTreePropertyBrowserPrivate *d_ptr; + QScopedPointer<QtTreePropertyBrowserPrivate> d_ptr; Q_DECLARE_PRIVATE(QtTreePropertyBrowser) Q_DISABLE_COPY(QtTreePropertyBrowser) diff --git a/tools/shared/qtpropertybrowser/qtvariantproperty.cpp b/tools/shared/qtpropertybrowser/qtvariantproperty.cpp index cdb0c29..b80d21d 100644 --- a/tools/shared/qtpropertybrowser/qtvariantproperty.cpp +++ b/tools/shared/qtpropertybrowser/qtvariantproperty.cpp @@ -188,9 +188,8 @@ public: \sa QtVariantPropertyManager */ QtVariantProperty::QtVariantProperty(QtVariantPropertyManager *manager) - : QtProperty(manager), d_ptr(new QtVariantPropertyPrivate(manager)) + : QtProperty(manager), d_ptr(new QtVariantPropertyPrivate(manager)) { - } /*! @@ -200,7 +199,6 @@ QtVariantProperty::QtVariantProperty(QtVariantPropertyManager *manager) */ QtVariantProperty::~QtVariantProperty() { - delete d_ptr; } /*! @@ -912,9 +910,8 @@ void QtVariantPropertyManagerPrivate::slotFlagNamesChanged(QtProperty *property, Creates a manager with the given \a parent. */ QtVariantPropertyManager::QtVariantPropertyManager(QObject *parent) - : QtAbstractPropertyManager(parent) + : QtAbstractPropertyManager(parent), d_ptr(new QtVariantPropertyManagerPrivate) { - d_ptr = new QtVariantPropertyManagerPrivate; d_ptr->q_ptr = this; d_ptr->m_creatingProperty = false; @@ -1234,7 +1231,6 @@ QtVariantPropertyManager::QtVariantPropertyManager(QObject *parent) QtVariantPropertyManager::~QtVariantPropertyManager() { clear(); - delete d_ptr; } /*! @@ -1929,9 +1925,8 @@ public: Creates a factory with the given \a parent. */ QtVariantEditorFactory::QtVariantEditorFactory(QObject *parent) - : QtAbstractEditorFactory<QtVariantPropertyManager>(parent) + : QtAbstractEditorFactory<QtVariantPropertyManager>(parent), d_ptr(new QtVariantEditorFactoryPrivate()) { - d_ptr = new QtVariantEditorFactoryPrivate(); d_ptr->q_ptr = this; d_ptr->m_spinBoxFactory = new QtSpinBoxFactory(this); @@ -1993,7 +1988,6 @@ QtVariantEditorFactory::QtVariantEditorFactory(QObject *parent) */ QtVariantEditorFactory::~QtVariantEditorFactory() { - delete d_ptr; } /*! diff --git a/tools/shared/qtpropertybrowser/qtvariantproperty.h b/tools/shared/qtpropertybrowser/qtvariantproperty.h index bfc9c44..4f32c57 100644 --- a/tools/shared/qtpropertybrowser/qtvariantproperty.h +++ b/tools/shared/qtpropertybrowser/qtvariantproperty.h @@ -67,7 +67,7 @@ protected: QtVariantProperty(QtVariantPropertyManager *manager); private: friend class QtVariantPropertyManager; - class QtVariantPropertyPrivate *d_ptr; + QScopedPointer<class QtVariantPropertyPrivate> d_ptr; }; class QtVariantPropertyManager : public QtAbstractPropertyManager @@ -111,7 +111,7 @@ protected: virtual void uninitializeProperty(QtProperty *property); virtual QtProperty *createProperty(); private: - class QtVariantPropertyManagerPrivate *d_ptr; + QScopedPointer<class QtVariantPropertyManagerPrivate> d_ptr; Q_PRIVATE_SLOT(d_func(), void slotValueChanged(QtProperty *, int)) Q_PRIVATE_SLOT(d_func(), void slotRangeChanged(QtProperty *, int, int)) Q_PRIVATE_SLOT(d_func(), void slotSingleStepChanged(QtProperty *, int)) @@ -165,7 +165,7 @@ protected: QWidget *parent); void disconnectPropertyManager(QtVariantPropertyManager *manager); private: - class QtVariantEditorFactoryPrivate *d_ptr; + QScopedPointer<class QtVariantEditorFactoryPrivate> d_ptr; Q_DECLARE_PRIVATE(QtVariantEditorFactory) Q_DISABLE_COPY(QtVariantEditorFactory) }; |