From ff7abee83bad69dc6700e67cc63027500734b877 Mon Sep 17 00:00:00 2001
From: Kai Koehne <kai.koehne@nokia.com>
Date: Mon, 22 Nov 2010 16:15:08 +0100
Subject: [PATCH] QmlJsDebugger: Remove QWEAKPOINTER_ENABLE_ARROW define

Any DEFINE used in qmljsdebugger-lib.pri is also passed to the users
code.
---
 .../qml/qmljsdebugger/editor/selectionindicator.cpp         | 4 ++--
 .../qml/qmljsdebugger/editor/selectionrectangle.cpp         | 2 +-
 .../qml/qmljsdebugger/qdeclarativeviewobserver.cpp          | 6 +++---
 share/qtcreator/qml/qmljsdebugger/qmljsdebugger-lib.pri     | 2 --
 4 files changed, 6 insertions(+), 8 deletions(-)

diff --git a/share/qtcreator/qml/qmljsdebugger/editor/selectionindicator.cpp b/share/qtcreator/qml/qmljsdebugger/editor/selectionindicator.cpp
index d6ba81bd736..d15eca8ff52 100644
--- a/share/qtcreator/qml/qmljsdebugger/editor/selectionindicator.cpp
+++ b/share/qtcreator/qml/qmljsdebugger/editor/selectionindicator.cpp
@@ -66,7 +66,7 @@ void SelectionIndicator::clear()
         QHashIterator<QGraphicsItem*, QGraphicsPolygonItem *> iter(m_indicatorShapeHash);
         while(iter.hasNext()) {
             iter.next();
-            m_layerItem->scene()->removeItem(iter.value());
+            m_layerItem.data()->scene()->removeItem(iter.value());
             delete iter.value();
         }
     }
@@ -111,7 +111,7 @@ void SelectionIndicator::setItems(const QList<QWeakPointer<QGraphicsObject> > &i
             addBoundingRectToPolygon(item, boundingShapeInSceneSpace);
 
             QRectF boundingRect = m_view->adjustToScreenBoundaries(boundingShapeInSceneSpace.boundingRect());
-            QPolygonF boundingRectInLayerItemSpace = m_layerItem->mapFromScene(boundingRect);
+            QPolygonF boundingRectInLayerItemSpace = m_layerItem.data()->mapFromScene(boundingRect);
 
             QPen pen;
             pen.setColor(QColor(108, 141, 221));
diff --git a/share/qtcreator/qml/qmljsdebugger/editor/selectionrectangle.cpp b/share/qtcreator/qml/qmljsdebugger/editor/selectionrectangle.cpp
index dc8ee26cce4..24a4a764416 100644
--- a/share/qtcreator/qml/qmljsdebugger/editor/selectionrectangle.cpp
+++ b/share/qtcreator/qml/qmljsdebugger/editor/selectionrectangle.cpp
@@ -56,7 +56,7 @@ SelectionRectangle::SelectionRectangle(QGraphicsObject *layerItem)
 SelectionRectangle::~SelectionRectangle()
 {
     if (m_layerItem)
-        m_layerItem->scene()->removeItem(m_controlShape);
+        m_layerItem.data()->scene()->removeItem(m_controlShape);
 }
 
 void SelectionRectangle::clear()
diff --git a/share/qtcreator/qml/qmljsdebugger/qdeclarativeviewobserver.cpp b/share/qtcreator/qml/qmljsdebugger/qdeclarativeviewobserver.cpp
index 9d9eace43d4..f67bbbb74e6 100644
--- a/share/qtcreator/qml/qmljsdebugger/qdeclarativeviewobserver.cpp
+++ b/share/qtcreator/qml/qmljsdebugger/qdeclarativeviewobserver.cpp
@@ -146,13 +146,13 @@ void QDeclarativeViewObserverPrivate::setViewport(QWidget *widget)
         return;
 
     if (viewport) {
-        viewport->removeEventFilter(q);
+        viewport.data()->removeEventFilter(q);
     }
     viewport = widget;
     if (viewport) {
         // make sure we get mouse move events
-        viewport->setMouseTracking(true);
-        viewport->installEventFilter(q);
+        viewport.data()->setMouseTracking(true);
+        viewport.data()->installEventFilter(q);
     }
 }
 
diff --git a/share/qtcreator/qml/qmljsdebugger/qmljsdebugger-lib.pri b/share/qtcreator/qml/qmljsdebugger/qmljsdebugger-lib.pri
index 271986afa41..0706d8c647b 100644
--- a/share/qtcreator/qml/qmljsdebugger/qmljsdebugger-lib.pri
+++ b/share/qtcreator/qml/qmljsdebugger/qmljsdebugger-lib.pri
@@ -62,8 +62,6 @@ SOURCES += \
         editor/toolbarcolorbox.cpp
 
     RESOURCES += editor/editor.qrc
-
-    DEFINES += QWEAKPOINTER_ENABLE_ARROW
 }
 
 OTHER_FILES += qmljsdebugger.pri
-- 
GitLab