From 524e279e3a64742491a709e54c84a4be1a20ae94 Mon Sep 17 00:00:00 2001
From: Olivier Goffart <olivier.goffart@nokia.com>
Date: Wed, 4 Aug 2010 16:25:02 +0200
Subject: [PATCH] Do not include private headers

---
 src/libs/qmljsdebugclient/qdeclarativedebug.cpp | 7 ++++---
 src/libs/qmljsdebugclient/qdeclarativedebug_p.h | 3 +++
 2 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/src/libs/qmljsdebugclient/qdeclarativedebug.cpp b/src/libs/qmljsdebugclient/qdeclarativedebug.cpp
index 1b9af0d0b4d..368eca7cf79 100644
--- a/src/libs/qmljsdebugclient/qdeclarativedebug.cpp
+++ b/src/libs/qmljsdebugclient/qdeclarativedebug.cpp
@@ -59,9 +59,9 @@ private:
     QDeclarativeEngineDebugPrivate *priv;
 };
 
-class QDeclarativeEngineDebugPrivate : public QObjectPrivate
+class QDeclarativeEngineDebugPrivate
 {
-    Q_DECLARE_PUBLIC(QDeclarativeEngineDebug)
+//    Q_DECLARE_PUBLIC(QDeclarativeEngineDebug)
 public:
     QDeclarativeEngineDebugPrivate(QDeclarativeDebugConnection *);
 
@@ -377,9 +377,10 @@ void QDeclarativeEngineDebugPrivate::message(const QByteArray &data)
 }
 
 QDeclarativeEngineDebug::QDeclarativeEngineDebug(QDeclarativeDebugConnection *client, QObject *parent)
-: QObject(*(new QDeclarativeEngineDebugPrivate(client)), parent)
+: QObject(parent), d_ptr(new QDeclarativeEngineDebugPrivate(client))
 {
 }
+QDeclarativeEngineDebug::~QDeclarativeEngineDebug() {}
 
 QDeclarativeDebugPropertyWatch *QDeclarativeEngineDebug::addWatch(const QDeclarativeDebugPropertyReference &property, QObject *parent)
 {
diff --git a/src/libs/qmljsdebugclient/qdeclarativedebug_p.h b/src/libs/qmljsdebugclient/qdeclarativedebug_p.h
index 2da1dea8a00..ffdbbb72168 100644
--- a/src/libs/qmljsdebugclient/qdeclarativedebug_p.h
+++ b/src/libs/qmljsdebugclient/qdeclarativedebug_p.h
@@ -70,6 +70,7 @@ class QDeclarativeEngineDebug : public QObject
 Q_OBJECT
 public:
     QDeclarativeEngineDebug(QDeclarativeDebugConnection *, QObject * = 0);
+    ~QDeclarativeEngineDebug();
 
     QDeclarativeDebugPropertyWatch *addWatch(const QDeclarativeDebugPropertyReference &,
                             QObject *parent = 0);
@@ -101,6 +102,8 @@ public:
 
 private:
     Q_DECLARE_PRIVATE(QDeclarativeEngineDebug)
+    Q_DISABLE_COPY(QDeclarativeEngineDebug)
+    QScopedPointer<QDeclarativeEngineDebugPrivate> d_ptr;
 };
 
 
-- 
GitLab