summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Jones <martin.jones@nokia.com>2010-03-17 04:50:17 (GMT)
committerMartin Jones <martin.jones@nokia.com>2010-03-17 04:50:17 (GMT)
commit07eff9d3d7cb95eec3700efdc5408caf403de9eb (patch)
tree330c01111115c4b0db4e8d7bcdd3918cdc48040c
parent13be084a5295a0406e6a0893e9fb1eeda5444940 (diff)
parent0830464f4a139234ba424b25590fc5d7bb5f4785 (diff)
downloadQt-07eff9d3d7cb95eec3700efdc5408caf403de9eb.zip
Qt-07eff9d3d7cb95eec3700efdc5408caf403de9eb.tar.gz
Qt-07eff9d3d7cb95eec3700efdc5408caf403de9eb.tar.bz2
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-qml into 4.7
-rw-r--r--src/declarative/graphicsitems/qdeclarativeitemsmodule.cpp1
-rw-r--r--src/declarative/graphicsitems/qdeclarativemousearea.cpp4
-rw-r--r--src/declarative/graphicsitems/qdeclarativemousearea_p.h8
-rw-r--r--tests/auto/declarative/qdeclarativestates/data/reset.qml4
-rw-r--r--tests/auto/declarative/qdeclarativestates/tst_qdeclarativestates.cpp4
5 files changed, 11 insertions, 10 deletions
diff --git a/src/declarative/graphicsitems/qdeclarativeitemsmodule.cpp b/src/declarative/graphicsitems/qdeclarativeitemsmodule.cpp
index 2ac55a4..1a48cbd 100644
--- a/src/declarative/graphicsitems/qdeclarativeitemsmodule.cpp
+++ b/src/declarative/graphicsitems/qdeclarativeitemsmodule.cpp
@@ -138,6 +138,7 @@ void QDeclarativeItemModule::defineModule()
qmlRegisterType<QDeclarativeKeyEvent>();
qmlRegisterType<QDeclarativeMouseEvent>();
qmlRegisterType<QGraphicsObject>();
+ qmlRegisterType<QGraphicsWidget>();
qmlRegisterType<QGraphicsTransform>();
qmlRegisterType<QDeclarativePathElement>();
qmlRegisterType<QDeclarativeCurve>();
diff --git a/src/declarative/graphicsitems/qdeclarativemousearea.cpp b/src/declarative/graphicsitems/qdeclarativemousearea.cpp
index 13195af..26242bc 100644
--- a/src/declarative/graphicsitems/qdeclarativemousearea.cpp
+++ b/src/declarative/graphicsitems/qdeclarativemousearea.cpp
@@ -58,12 +58,12 @@ QDeclarativeDrag::~QDeclarativeDrag()
{
}
-QDeclarativeItem *QDeclarativeDrag::target() const
+QGraphicsObject *QDeclarativeDrag::target() const
{
return _target;
}
-void QDeclarativeDrag::setTarget(QDeclarativeItem *t)
+void QDeclarativeDrag::setTarget(QGraphicsObject *t)
{
if (_target == t)
return;
diff --git a/src/declarative/graphicsitems/qdeclarativemousearea_p.h b/src/declarative/graphicsitems/qdeclarativemousearea_p.h
index 33422e2..db49b57 100644
--- a/src/declarative/graphicsitems/qdeclarativemousearea_p.h
+++ b/src/declarative/graphicsitems/qdeclarativemousearea_p.h
@@ -55,7 +55,7 @@ class Q_DECLARATIVE_EXPORT QDeclarativeDrag : public QObject
Q_OBJECT
Q_ENUMS(Axis)
- Q_PROPERTY(QDeclarativeItem *target READ target WRITE setTarget NOTIFY targetChanged)
+ Q_PROPERTY(QGraphicsObject *target READ target WRITE setTarget NOTIFY targetChanged)
Q_PROPERTY(Axis axis READ axis WRITE setAxis NOTIFY axisChanged)
Q_PROPERTY(qreal minimumX READ xmin WRITE setXmin NOTIFY minimumXChanged)
Q_PROPERTY(qreal maximumX READ xmax WRITE setXmax NOTIFY maximumXChanged)
@@ -67,8 +67,8 @@ public:
QDeclarativeDrag(QObject *parent=0);
~QDeclarativeDrag();
- QDeclarativeItem *target() const;
- void setTarget(QDeclarativeItem *);
+ QGraphicsObject *target() const;
+ void setTarget(QGraphicsObject *);
enum Axis { XAxis=0x01, YAxis=0x02, XandYAxis=0x03 };
Axis axis() const;
@@ -92,7 +92,7 @@ Q_SIGNALS:
void maximumYChanged();
private:
- QDeclarativeItem *_target;
+ QGraphicsObject *_target;
Axis _axis;
qreal _xmin;
qreal _xmax;
diff --git a/tests/auto/declarative/qdeclarativestates/data/reset.qml b/tests/auto/declarative/qdeclarativestates/data/reset.qml
index a0a2b8c..8e9b13a 100644
--- a/tests/auto/declarative/qdeclarativestates/data/reset.qml
+++ b/tests/auto/declarative/qdeclarativestates/data/reset.qml
@@ -5,9 +5,9 @@ Rectangle {
height: 480
Text {
id: theText
- width: 50
+ width: 40
wrap: true
- text: "a text string that is longer than 50 pixels"
+ text: "a text string that is longer than 40 pixels"
}
states: State {
diff --git a/tests/auto/declarative/qdeclarativestates/tst_qdeclarativestates.cpp b/tests/auto/declarative/qdeclarativestates/tst_qdeclarativestates.cpp
index eb0e2bd..c16a870 100644
--- a/tests/auto/declarative/qdeclarativestates/tst_qdeclarativestates.cpp
+++ b/tests/auto/declarative/qdeclarativestates/tst_qdeclarativestates.cpp
@@ -955,12 +955,12 @@ void tst_qdeclarativestates::reset()
QDeclarativeText *text = rect->findChild<QDeclarativeText*>();
QVERIFY(text != 0);
- QCOMPARE(text->width(), qreal(50.));
+ QCOMPARE(text->width(), qreal(40.));
QVERIFY(text->width() < text->height());
rect->setState("state1");
- QVERIFY(text->width() > 51);
+ QVERIFY(text->width() > 41);
QVERIFY(text->width() > text->height());
}