diff options
author | Liang Qi <liang.qi@theqtcompany.com> | 2016-04-04 08:59:11 +0200 |
---|---|---|
committer | Liang Qi <liang.qi@theqtcompany.com> | 2016-04-04 08:59:18 +0200 |
commit | 216f57ef8682f74b72ae4e39cf1fd23abddf6a51 (patch) | |
tree | 9d1dc12e0944ec0252dac843fbadaf1dc4693888 /src/widgets/graphicsview/qgraphicsgridlayout.cpp | |
parent | 36bc2477753d19a14c587b97d4ec4f263e9e16c0 (diff) | |
parent | 8ce657d0279566ef327af1b88339534041ddc012 (diff) |
Merge remote-tracking branch 'origin/5.6' into 5.7
Change-Id: I35ca979395620e104e50b06366d0869433a4ffc2
Diffstat (limited to 'src/widgets/graphicsview/qgraphicsgridlayout.cpp')
-rw-r--r-- | src/widgets/graphicsview/qgraphicsgridlayout.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/widgets/graphicsview/qgraphicsgridlayout.cpp b/src/widgets/graphicsview/qgraphicsgridlayout.cpp index 422193d4dd..ae761d3478 100644 --- a/src/widgets/graphicsview/qgraphicsgridlayout.cpp +++ b/src/widgets/graphicsview/qgraphicsgridlayout.cpp @@ -89,6 +89,7 @@ #include "qgraphicswidget.h" #include "qgraphicsgridlayoutengine_p.h" #include "qgraphicslayoutstyleinfo_p.h" +#include "qscopedpointer.h" #ifdef QT_DEBUG # include <QtCore/qdebug.h> #endif @@ -98,10 +99,10 @@ QT_BEGIN_NAMESPACE class QGraphicsGridLayoutPrivate : public QGraphicsLayoutPrivate { public: - QGraphicsGridLayoutPrivate(): m_styleInfo(0) { } + QGraphicsGridLayoutPrivate() { } QGraphicsLayoutStyleInfo *styleInfo() const; - mutable QGraphicsLayoutStyleInfo *m_styleInfo; + mutable QScopedPointer<QGraphicsLayoutStyleInfo> m_styleInfo; QGraphicsGridLayoutEngine engine; #ifdef QGRIDLAYOUTENGINE_DEBUG @@ -113,8 +114,8 @@ public: QGraphicsLayoutStyleInfo *QGraphicsGridLayoutPrivate::styleInfo() const { if (!m_styleInfo) - m_styleInfo = new QGraphicsLayoutStyleInfo(this); - return m_styleInfo; + m_styleInfo.reset(new QGraphicsLayoutStyleInfo(this)); + return m_styleInfo.data(); } /*! |