diff options
author | Michael Brasser <michael.brasser@nokia.com> | 2009-09-29 04:09:22 (GMT) |
---|---|---|
committer | Michael Brasser <michael.brasser@nokia.com> | 2009-09-29 04:09:22 (GMT) |
commit | a4fc9805bd1dd8798ccb2918e4dbd3ed8b0ca2f9 (patch) | |
tree | cde3a64dd68b32f5dfc7d39cfa62a59ec3f90974 | |
parent | 575ad2c60482b279f828cfa87186b5fbb10f76c6 (diff) | |
parent | 5b3eed36952f6c8b966b709e5630385c3b13715b (diff) | |
download | Qt-a4fc9805bd1dd8798ccb2918e4dbd3ed8b0ca2f9.zip Qt-a4fc9805bd1dd8798ccb2918e4dbd3ed8b0ca2f9.tar.gz Qt-a4fc9805bd1dd8798ccb2918e4dbd3ed8b0ca2f9.tar.bz2 |
Merge branch 'kinetic-declarativeui' of git@scm.dev.nokia.troll.no:qt/kinetic into kinetic-declarativeui
-rw-r--r-- | src/declarative/qml/qmlenginedebug.cpp | 4 | ||||
-rw-r--r-- | src/gui/graphicsview/qgraphicsitem.cpp | 10 | ||||
-rw-r--r-- | tools/qmldebugger/engine.cpp | 27 | ||||
-rw-r--r-- | tools/qmldebugger/engine.h | 2 |
4 files changed, 18 insertions, 25 deletions
diff --git a/src/declarative/qml/qmlenginedebug.cpp b/src/declarative/qml/qmlenginedebug.cpp index 9f0bae6..16129ee 100644 --- a/src/declarative/qml/qmlenginedebug.cpp +++ b/src/declarative/qml/qmlenginedebug.cpp @@ -318,8 +318,8 @@ void QmlEngineDebugServer::propertyChanged(int id, int objectId, const QByteArra QByteArray reply; QVariant v; QDataStream rs(&reply, QIODevice::WriteOnly); - - if (value.type() == QVariant::UserType) { + + if (value.type() == QVariant::UserType || QmlMetaType::isObject(value.userType())) { QObject *o = QmlMetaType::toQObject(value); if (o) { QString objectName = o->objectName(); diff --git a/src/gui/graphicsview/qgraphicsitem.cpp b/src/gui/graphicsview/qgraphicsitem.cpp index c3934c7..13b677c 100644 --- a/src/gui/graphicsview/qgraphicsitem.cpp +++ b/src/gui/graphicsview/qgraphicsitem.cpp @@ -3120,6 +3120,9 @@ QPointF QGraphicsItem::pos() const */ void QGraphicsItem::setX(qreal x) { + if (d_ptr->inDestructor) + return; + d_ptr->setPosHelper(QPointF(x, d_ptr->pos.y())); } @@ -3141,6 +3144,9 @@ void QGraphicsItem::setX(qreal x) */ void QGraphicsItem::setY(qreal y) { + if (d_ptr->inDestructor) + return; + d_ptr->setPosHelper(QPointF(d_ptr->pos.x(), y)); } @@ -3163,6 +3169,7 @@ QPointF QGraphicsItem::scenePos() const void QGraphicsItemPrivate::setPosHelper(const QPointF &pos) { Q_Q(QGraphicsItem); + inSetPosHelper = 1; updateCachedClipPathFromSetPosHelper(pos); if (scene) @@ -3206,6 +3213,9 @@ void QGraphicsItem::setPos(const QPointF &pos) if (d_ptr->pos == pos) return; + if (d_ptr->inDestructor) + return; + // Update and repositition. if (!(d_ptr->flags & ItemSendsGeometryChanges)) { d_ptr->setPosHelper(pos); diff --git a/tools/qmldebugger/engine.cpp b/tools/qmldebugger/engine.cpp index 8a06213..fedae6b 100644 --- a/tools/qmldebugger/engine.cpp +++ b/tools/qmldebugger/engine.cpp @@ -8,6 +8,7 @@ #include <QLineEdit> #include <QTreeWidget> #include <QTableWidget> +#include <QSplitter> #include <QTabWidget> #include <QMouseEvent> #include <QAction> @@ -183,22 +184,13 @@ EnginePane::EnginePane(QmlDebugConnection *client, QWidget *parent) layout->addWidget(m_engineView); - - m_text = new QLineEdit(this); - layout->addWidget(m_text); - - QPushButton *query = new QPushButton("Fetch object", this); - QObject::connect(query, SIGNAL(clicked()), this, SLOT(fetchClicked())); - layout->addWidget(query); - - QHBoxLayout *hbox = new QHBoxLayout; - hbox->setContentsMargins(0, 0, 0, 0); + QSplitter *splitter = new QSplitter; m_objTree = new QmlObjectTree(this); m_objTree->setHeaderHidden(true); connect(m_objTree, SIGNAL(itemClicked(QTreeWidgetItem *, int)), this, SLOT(itemClicked(QTreeWidgetItem *))); connect(m_objTree, SIGNAL(addExpressionWatch(int,QString)), this, SLOT(addExpressionWatch(int,QString))); - hbox->addWidget(m_objTree); + splitter->addWidget(m_objTree); m_propView = new PropertyView(this); connect(m_propView, SIGNAL(propertyActivated(QmlDebugPropertyReference)), @@ -218,10 +210,9 @@ EnginePane::EnginePane(QmlDebugConnection *client, QWidget *parent) m_tabs->addTab(m_propView, tr("Properties")); m_tabs->addTab(m_watchTable, tr("Watched")); - hbox->addWidget(m_tabs); - hbox->setStretchFactor(m_tabs, 2); - - layout->addLayout(hbox); + splitter->addWidget(m_tabs); + splitter->setStretchFactor(1, 2); + layout->addWidget(splitter); } void EnginePane::engineSelected(int id) @@ -458,12 +449,6 @@ void EnginePane::enginesChanged() m_engineView->rootContext()->setContextProperty("engines", qVariantFromValue(&m_engineItems)); } -void EnginePane::fetchClicked() -{ - int id = m_text->text().toInt(); - fetchObject(id); -} - void EnginePane::fetchObject(int id) { if (m_object) { diff --git a/tools/qmldebugger/engine.h b/tools/qmldebugger/engine.h index 8e5d384..62fc6fb 100644 --- a/tools/qmldebugger/engine.h +++ b/tools/qmldebugger/engine.h @@ -39,7 +39,6 @@ private slots: void queryContext(int); void contextChanged(); - void fetchClicked(); void fetchObject(int); void objectFetched(); @@ -66,7 +65,6 @@ private: QmlDebugRootContextQuery *m_context; QmlDebugObjectQuery *m_object; - QLineEdit *m_text; QmlObjectTree *m_objTree; QTabWidget *m_tabs; PropertyView *m_propView; |