summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/gui/graphicsview/qgraphicsanchorlayout.cpp8
-rw-r--r--src/gui/graphicsview/qgraphicsanchorlayout.h1
-rw-r--r--src/gui/graphicsview/qgraphicsanchorlayout_p.h4
3 files changed, 5 insertions, 8 deletions
diff --git a/src/gui/graphicsview/qgraphicsanchorlayout.cpp b/src/gui/graphicsview/qgraphicsanchorlayout.cpp
index d737e36..d91b4ab 100644
--- a/src/gui/graphicsview/qgraphicsanchorlayout.cpp
+++ b/src/gui/graphicsview/qgraphicsanchorlayout.cpp
@@ -42,12 +42,10 @@
#include "qgraphicsanchorlayout_p.h"
QGraphicsAnchorLayout::QGraphicsAnchorLayout(QGraphicsLayoutItem *parent)
- : QGraphicsLayout(parent), d_ptr(new QGraphicsAnchorLayoutPrivate())
+ : QGraphicsLayout(*new QGraphicsAnchorLayoutPrivate(), parent)
{
- // ### REMOVE THAT
- d_ptr->q_ptr = this;
-
- d_ptr->createLayoutEdges();
+ Q_D(QGraphicsAnchorLayout);
+ d->createLayoutEdges();
}
QGraphicsAnchorLayout::~QGraphicsAnchorLayout()
diff --git a/src/gui/graphicsview/qgraphicsanchorlayout.h b/src/gui/graphicsview/qgraphicsanchorlayout.h
index 288aec1..2093b15 100644
--- a/src/gui/graphicsview/qgraphicsanchorlayout.h
+++ b/src/gui/graphicsview/qgraphicsanchorlayout.h
@@ -89,7 +89,6 @@ public:
///////// DEBUG /////////
void dumpGraph();
- QGraphicsAnchorLayoutPrivate *d_ptr; //### TO REMOVE
protected:
private:
diff --git a/src/gui/graphicsview/qgraphicsanchorlayout_p.h b/src/gui/graphicsview/qgraphicsanchorlayout_p.h
index e8f5783..65315fb 100644
--- a/src/gui/graphicsview/qgraphicsanchorlayout_p.h
+++ b/src/gui/graphicsview/qgraphicsanchorlayout_p.h
@@ -41,6 +41,7 @@
#include <QGraphicsWidget>
+#include "qgraphicslayout_p.h"
#include "qgraphicsanchorlayout.h"
#include "qgraph_p.h"
#include "qsimplex_p.h"
@@ -196,10 +197,9 @@ public:
QGraphicsAnchorLayout private methods and attributes.
*/
-class QGraphicsAnchorLayoutPrivate
+class QGraphicsAnchorLayoutPrivate : public QGraphicsLayoutPrivate
{
Q_DECLARE_PUBLIC(QGraphicsAnchorLayout)
- QGraphicsAnchorLayout *q_ptr;
public:
// When the layout geometry is different from its Minimum, Preferred