diff --git a/share/qtcreator/qmljsdebugger/include/qdeclarativedesigndebugserver.h b/share/qtcreator/qmljsdebugger/include/qdeclarativedesigndebugserver.h index 53a554949a639f7a867479e16182904d04ef96ae..f93508194acdbbecae3e54934bfbe1c60eba6741 100644 --- a/share/qtcreator/qmljsdebugger/include/qdeclarativedesigndebugserver.h +++ b/share/qtcreator/qmljsdebugger/include/qdeclarativedesigndebugserver.h @@ -72,7 +72,6 @@ public: public Q_SLOTS: void selectedColorChanged(const QColor &color); void contextPathUpdated(const QStringList &contextPath); - void sceneItemCountChanged(); Q_SIGNALS: void currentObjectsChanged(const QList<QObject*> &objects); diff --git a/share/qtcreator/qmljsdebugger/include/qdeclarativedesignview.h b/share/qtcreator/qmljsdebugger/include/qdeclarativedesignview.h index 543aaada671018956f050a0400f40cbd441d9154..8909fda24f882c814d9db696818ef10c5ac7b15b 100644 --- a/share/qtcreator/qmljsdebugger/include/qdeclarativedesignview.h +++ b/share/qtcreator/qmljsdebugger/include/qdeclarativedesignview.h @@ -111,8 +111,6 @@ private: Q_PRIVATE_SLOT(d_func(), void _q_changeToColorPickerTool()) Q_PRIVATE_SLOT(d_func(), void _q_changeContextPathIndex(int index)) Q_PRIVATE_SLOT(d_func(), void _q_clearComponentCache()); - Q_PRIVATE_SLOT(d_func(), void _q_sceneChanged(const QList<QRectF> &areas)); - Q_PRIVATE_SLOT(d_func(), void _q_checkSceneItemCount()); inline QDeclarativeDesignViewPrivate *d_func() { return data.data(); } QScopedPointer<QDeclarativeDesignViewPrivate> data; diff --git a/share/qtcreator/qmljsdebugger/qdeclarativedesigndebugserver.cpp b/share/qtcreator/qmljsdebugger/qdeclarativedesigndebugserver.cpp index 315c529bb9067555293ab051bad13df943e134d9..bf68d432ffcf598810f5e1a3f051f218b2e4a24c 100644 --- a/share/qtcreator/qmljsdebugger/qdeclarativedesigndebugserver.cpp +++ b/share/qtcreator/qmljsdebugger/qdeclarativedesigndebugserver.cpp @@ -211,16 +211,6 @@ void QDeclarativeDesignDebugServer::contextPathUpdated(const QStringList &contex sendMessage(message); } -void QDeclarativeDesignDebugServer::sceneItemCountChanged() -{ - QByteArray message; - QDataStream ds(&message, QIODevice::WriteOnly); - - ds << QByteArray("SCENE_ITEM_COUNT_CHANGED"); - - sendMessage(message); -} - QString QDeclarativeDesignDebugServer::idStringForObject(QObject *obj) const { int id = idForObject(obj); diff --git a/share/qtcreator/qmljsdebugger/qdeclarativedesignview.cpp b/share/qtcreator/qmljsdebugger/qdeclarativedesignview.cpp index 704711f9da8eb58df8573442e1407b5f4d8cfec6..a086b984fe2b214f6f767500fbd530bb202a11d6 100644 --- a/share/qtcreator/qmljsdebugger/qdeclarativedesignview.cpp +++ b/share/qtcreator/qmljsdebugger/qdeclarativedesignview.cpp @@ -66,8 +66,6 @@ QDeclarativeDesignViewPrivate::QDeclarativeDesignViewPrivate(QDeclarativeDesignV jsDebuggerAgent(0), toolbar(0) { - sceneChangedTimer.setInterval(SceneChangeUpdateInterval); - sceneChangedTimer.setSingleShot(true); } QDeclarativeDesignViewPrivate::~QDeclarativeDesignViewPrivate() @@ -85,7 +83,6 @@ QDeclarativeDesignView::QDeclarativeDesignView(QWidget *parent) : data->subcomponentEditorTool = new SubcomponentEditorTool(this); data->currentTool = data->selectionTool; - connect(scene(), SIGNAL(changed(QList<QRectF>)), SLOT(_q_sceneChanged(QList<QRectF>))); setMouseTracking(true); connect(qmlDesignDebugServer(), SIGNAL(designModeBehaviorChanged(bool)), SLOT(setDesignModeBehavior(bool))); @@ -114,8 +111,6 @@ QDeclarativeDesignView::QDeclarativeDesignView(QWidget *parent) : connect(data->subcomponentEditorTool, SIGNAL(contextPopped()), SIGNAL(inspectorContextPopped())); connect(data->subcomponentEditorTool, SIGNAL(contextPathChanged(QStringList)), qmlDesignDebugServer(), SLOT(contextPathUpdated(QStringList))); - connect(&(data->sceneChangedTimer), SIGNAL(timeout()), SLOT(_q_checkSceneItemCount())); - data->createToolbar(); data->_q_changeToSingleSelectTool(); @@ -535,55 +530,6 @@ void QDeclarativeDesignViewPrivate::_q_changeContextPathIndex(int index) subcomponentEditorTool->setContext(index); } -void QDeclarativeDesignViewPrivate::_q_sceneChanged(const QList<QRectF> & /*areas*/) -{ - if (designModeBehavior) - return; - - if (!sceneChangedTimer.isActive()) - sceneChangedTimer.start(); -} - -void QDeclarativeDesignViewPrivate::_q_checkSceneItemCount() -{ - bool hasNewItems = hasNewGraphicsObjects(q->rootObject()); - - if (hasNewItems) { - qmlDesignDebugServer()->sceneItemCountChanged(); - } -} - -static bool hasNewGraphicsObjectsRecur(QGraphicsObject *object, - QSet<QGraphicsObject *> &newItems, - const QSet<QGraphicsObject *> &previousItems) -{ - bool hasNew = false; - - newItems << object; - - foreach(QGraphicsItem *item, object->childItems()) { - QGraphicsObject *gfxObject = item->toGraphicsObject(); - if (gfxObject) { - newItems << gfxObject; - - hasNew = hasNewGraphicsObjectsRecur(gfxObject, newItems, previousItems) || hasNew; - if (!previousItems.contains(gfxObject)) - hasNew = true; - } - } - - return hasNew; -} - -bool QDeclarativeDesignViewPrivate::hasNewGraphicsObjects(QGraphicsObject *object) -{ - QSet<QGraphicsObject *> newItems; - bool ret = hasNewGraphicsObjectsRecur(object, newItems, sceneGraphicsObjects); - sceneGraphicsObjects = newItems; - - return ret; -} - void QDeclarativeDesignView::changeAnimationSpeed(qreal slowdownFactor) { data->slowdownFactor = slowdownFactor; @@ -674,7 +620,6 @@ void QDeclarativeDesignViewPrivate::_q_onStatusChanged(QDeclarativeView::Status { if (status == QDeclarativeView::Ready) { if (q->rootObject()) { - hasNewGraphicsObjects(q->rootObject()); if (subcomponentEditorTool->contextIndex() != -1) subcomponentEditorTool->clear(); subcomponentEditorTool->pushContext(q->rootObject()); diff --git a/share/qtcreator/qmljsdebugger/qdeclarativedesignview_p.h b/share/qtcreator/qmljsdebugger/qdeclarativedesignview_p.h index d83f46aca9cad4abdd45d362dd28d4edbc385fff..0c79810ceec37e41cbb528eb2401ff3a23907656 100644 --- a/share/qtcreator/qmljsdebugger/qdeclarativedesignview_p.h +++ b/share/qtcreator/qmljsdebugger/qdeclarativedesignview_p.h @@ -87,8 +87,6 @@ public: JSDebuggerAgent *jsDebuggerAgent; QmlToolbar *toolbar; - QTimer sceneChangedTimer; - QSet<QGraphicsObject *> sceneGraphicsObjects; void clearEditorItems(); void createToolbar(); @@ -100,8 +98,6 @@ public: QList<QGraphicsItem*> selectableItems(const QPointF &scenePos) const; QList<QGraphicsItem*> selectableItems(const QRectF &sceneRect, Qt::ItemSelectionMode selectionMode) const; - bool hasNewGraphicsObjects(QGraphicsObject *object); - void setSelectedItemsForTools(QList<QGraphicsItem *> items); void setSelectedItems(QList<QGraphicsItem *> items); QList<QGraphicsItem *> selectedItems(); @@ -132,9 +128,6 @@ public: void _q_changeToColorPickerTool(); void _q_changeContextPathIndex(int index); void _q_clearComponentCache(); - void _q_sceneChanged(const QList<QRectF> &areas); - void _q_changeDebugObjectCount(int objectCount); - void _q_checkSceneItemCount(); static QDeclarativeDesignViewPrivate *get(QDeclarativeDesignView *v) { return v->d_func(); } }; diff --git a/src/plugins/qmljsinspector/qmljsclientproxy.cpp b/src/plugins/qmljsinspector/qmljsclientproxy.cpp index 6b5e25811689cb9e41ed40821e043cd927d2c104..2a81edac6e99e7fb626003f3473aa81d47aa912c 100644 --- a/src/plugins/qmljsinspector/qmljsclientproxy.cpp +++ b/src/plugins/qmljsinspector/qmljsclientproxy.cpp @@ -85,9 +85,6 @@ void ClientProxy::connectToServer() SIGNAL(selectedColorChanged(QColor))); connect(m_designClient, SIGNAL(contextPathUpdated(QStringList)), SIGNAL(contextPathUpdated(QStringList))); - /* connect(m_designClient, SIGNAL(treeRefreshRequested()), - SLOT(refreshObjectTree()));*/ - reloadEngines(); } @@ -454,4 +451,3 @@ void ClientProxy::newObjects() if (!m_requestObjectsTimer.isActive()) m_requestObjectsTimer.start(); } - diff --git a/src/plugins/qmljsinspector/qmljsdesigndebugclient.cpp b/src/plugins/qmljsinspector/qmljsdesigndebugclient.cpp index 2e2b2332cb3e21014ad928901c68d972d72c492a..5bc160b52003a2c82dc48bc2fb17ec66b1d53cdd 100644 --- a/src/plugins/qmljsinspector/qmljsdesigndebugclient.cpp +++ b/src/plugins/qmljsinspector/qmljsdesigndebugclient.cpp @@ -108,8 +108,6 @@ void QmlJSDesignDebugClient::messageReceived(const QByteArray &message) QStringList contextPath; ds >> contextPath; emit contextPathUpdated(contextPath); - } else if (type == "SCENE_ITEM_COUNT_CHANGED") { - //emit treeRefreshRequested(); } } diff --git a/src/plugins/qmljsinspector/qmljsdesigndebugclient.h b/src/plugins/qmljsinspector/qmljsdesigndebugclient.h index 9b7458f3f6abe74cfc1f4c21b073ea53663b4868..406495844bd57d89cee7a5c00a219c27cf91c848 100644 --- a/src/plugins/qmljsinspector/qmljsdesigndebugclient.h +++ b/src/plugins/qmljsinspector/qmljsdesigndebugclient.h @@ -89,7 +89,6 @@ signals: void designModeBehaviorChanged(bool inDesignMode); void reloaded(); // the server has reloaded the document void contextPathUpdated(const QStringList &path); - void treeRefreshRequested(); // scene has some new items protected: virtual void messageReceived(const QByteArray &);