summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-04-23 03:09:51 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-04-23 03:09:51 (GMT)
commit6c4a1d0664f74fc9fe0533ca245d75355695e5be (patch)
treea055210a51704f4454398b64d6a77e4608210369 /src/gui
parent4894e6dd57c31e0196c6fdae4d1b2fb16b9f1b16 (diff)
parente24aa4af60718e17405871fb3776107adc0b36f1 (diff)
downloadQt-6c4a1d0664f74fc9fe0533ca245d75355695e5be.zip
Qt-6c4a1d0664f74fc9fe0533ca245d75355695e5be.tar.gz
Qt-6c4a1d0664f74fc9fe0533ca245d75355695e5be.tar.bz2
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-qml into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/qt-qml: (144 commits) Don't crash if Connections::target is changed by one of its signal handlers Update visual tests after some painter updates. Add missing Q_DISABLE_COPYs. Use Q_DECLARE_PRIVATE for private slot. Workaround no longer needed. Rename QDeclarativeExpression::value() to evaluate(). Continue to register base type. Doc. Remove the deprecated wrap property. Do not treat images in qml examples differently. Replace Flickable overshoot property with boundsBehavior Autotests and doc Give error on attempt to import types from too-early version number. Remove (undocumented) QML bindings for effects. De-straighten them lines. Doc: fix QStringList model doc (really). Doc: fix QStringList model docs Change return type to match value(). Add duration and easing properties to AnchorAnimation. Autotest ...
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/graphicsview/qgraphicsitem.cpp10
-rw-r--r--src/gui/graphicsview/qgraphicsitem_p.h1
-rw-r--r--src/gui/widgets/qlinecontrol.cpp2
3 files changed, 13 insertions, 0 deletions
diff --git a/src/gui/graphicsview/qgraphicsitem.cpp b/src/gui/graphicsview/qgraphicsitem.cpp
index 20ea262..6cc3f7d 100644
--- a/src/gui/graphicsview/qgraphicsitem.cpp
+++ b/src/gui/graphicsview/qgraphicsitem.cpp
@@ -1237,6 +1237,8 @@ void QGraphicsItemPrivate::setParentItemHelper(QGraphicsItem *newParent, const Q
}
dirtySceneTransform = 1;
+ if (!inDestructor && (transformData || (newParent && newParent->d_ptr->transformData)))
+ transformChanged();
// Restore the sub focus chain.
if (subFocusItem) {
@@ -3622,6 +3624,7 @@ void QGraphicsItemPrivate::setTransformHelper(const QTransform &transform)
q_ptr->prepareGeometryChange();
transformData->transform = transform;
dirtySceneTransform = 1;
+ transformChanged();
}
/*!
@@ -3812,6 +3815,8 @@ void QGraphicsItem::setRotation(qreal angle)
if (d_ptr->isObject)
emit static_cast<QGraphicsObject *>(this)->rotationChanged();
+
+ d_ptr->transformChanged();
}
/*!
@@ -3876,6 +3881,8 @@ void QGraphicsItem::setScale(qreal factor)
if (d_ptr->isObject)
emit static_cast<QGraphicsObject *>(this)->scaleChanged();
+
+ d_ptr->transformChanged();
}
@@ -3931,6 +3938,7 @@ void QGraphicsItem::setTransformations(const QList<QGraphicsTransform *> &transf
transformations.at(i)->d_func()->setItem(this);
d_ptr->transformData->onlyTransform = false;
d_ptr->dirtySceneTransform = 1;
+ d_ptr->transformChanged();
}
/*!
@@ -3947,6 +3955,7 @@ void QGraphicsItemPrivate::prependGraphicsTransform(QGraphicsTransform *t)
t->d_func()->setItem(q);
transformData->onlyTransform = false;
dirtySceneTransform = 1;
+ transformChanged();
}
/*!
@@ -3963,6 +3972,7 @@ void QGraphicsItemPrivate::appendGraphicsTransform(QGraphicsTransform *t)
t->d_func()->setItem(q);
transformData->onlyTransform = false;
dirtySceneTransform = 1;
+ transformChanged();
}
/*!
diff --git a/src/gui/graphicsview/qgraphicsitem_p.h b/src/gui/graphicsview/qgraphicsitem_p.h
index f922842..8c7fbb4 100644
--- a/src/gui/graphicsview/qgraphicsitem_p.h
+++ b/src/gui/graphicsview/qgraphicsitem_p.h
@@ -284,6 +284,7 @@ public:
void setEnabledHelper(bool newEnabled, bool explicitly, bool update = true);
bool discardUpdateRequest(bool ignoreVisibleBit = false,
bool ignoreDirtyBit = false, bool ignoreOpacity = false) const;
+ virtual void transformChanged() {}
int depth() const;
#ifndef QT_NO_GRAPHICSEFFECT
enum InvalidateReason {
diff --git a/src/gui/widgets/qlinecontrol.cpp b/src/gui/widgets/qlinecontrol.cpp
index 42df800..d027b91 100644
--- a/src/gui/widgets/qlinecontrol.cpp
+++ b/src/gui/widgets/qlinecontrol.cpp
@@ -1350,6 +1350,7 @@ bool QLineControl::processEvent(QEvent* ev)
#endif
switch(ev->type()){
#ifndef QT_NO_GRAPHICSVIEW
+ case QEvent::GraphicsSceneMouseDoubleClick:
case QEvent::GraphicsSceneMouseMove:
case QEvent::GraphicsSceneMouseRelease:
case QEvent::GraphicsSceneMousePress:{
@@ -1439,6 +1440,7 @@ void QLineControl::processMouseEvent(QMouseEvent* ev)
moveCursor(cursor, mark);
break;
}
+ case QEvent::GraphicsSceneMouseDoubleClick:
case QEvent::MouseButtonDblClick:
if (ev->button() == Qt::LeftButton) {
selectWordAtPos(xToPos(ev->pos().x()));