summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAaron Kennedy <aaron.kennedy@nokia.com>2010-04-28 04:13:57 (GMT)
committerAaron Kennedy <aaron.kennedy@nokia.com>2010-04-28 04:13:57 (GMT)
commit57a76a94e5b60c5c7c82ec86bea4f206f6f08f4e (patch)
tree79beb34994de19b7fd8153c09a87dc1bc852d77e
parent999bd1a29cd21b1ef28d8551a5dedf34ec9e1de3 (diff)
parente433864cf2236d1445ceff89417b2a2fa90cd4a4 (diff)
downloadQt-57a76a94e5b60c5c7c82ec86bea4f206f6f08f4e.zip
Qt-57a76a94e5b60c5c7c82ec86bea4f206f6f08f4e.tar.gz
Qt-57a76a94e5b60c5c7c82ec86bea4f206f6f08f4e.tar.bz2
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-qml into 4.7
-rw-r--r--doc/src/declarative/integrating.qdoc12
-rw-r--r--doc/src/declarative/qtbinding.qdoc26
-rw-r--r--doc/src/snippets/declarative/graphicswidgets/bluecircle.h (renamed from doc/src/declarative/snippets/integrating/graphicswidgets/bluecircle.h)0
-rw-r--r--doc/src/snippets/declarative/graphicswidgets/graphicswidgets.pro (renamed from doc/src/declarative/snippets/integrating/graphicswidgets/graphicswidgets.pro)0
-rw-r--r--doc/src/snippets/declarative/graphicswidgets/main.qml (renamed from doc/src/declarative/snippets/integrating/graphicswidgets/main.qml)0
-rw-r--r--doc/src/snippets/declarative/graphicswidgets/qmldir (renamed from doc/src/declarative/snippets/integrating/graphicswidgets/qmldir)0
-rw-r--r--doc/src/snippets/declarative/graphicswidgets/redsquare.h (renamed from doc/src/declarative/snippets/integrating/graphicswidgets/redsquare.h)0
-rw-r--r--doc/src/snippets/declarative/graphicswidgets/shapesplugin.cpp (renamed from doc/src/declarative/snippets/integrating/graphicswidgets/shapesplugin.cpp)0
-rw-r--r--doc/src/snippets/declarative/qtbinding/contextproperties/contextproperties.pro (renamed from doc/src/declarative/snippets/qtbinding/contextproperties/contextproperties.pro)0
-rw-r--r--doc/src/snippets/declarative/qtbinding/contextproperties/main.cpp (renamed from doc/src/declarative/snippets/qtbinding/contextproperties/main.cpp)0
-rw-r--r--doc/src/snippets/declarative/qtbinding/contextproperties/main.qml (renamed from doc/src/declarative/snippets/qtbinding/contextproperties/main.qml)0
-rw-r--r--doc/src/snippets/declarative/qtbinding/custompalette/custompalette.h (renamed from doc/src/declarative/snippets/qtbinding/custompalette/custompalette.h)0
-rw-r--r--doc/src/snippets/declarative/qtbinding/custompalette/custompalette.pro (renamed from doc/src/declarative/snippets/qtbinding/custompalette/custompalette.pro)0
-rw-r--r--doc/src/snippets/declarative/qtbinding/custompalette/main.cpp (renamed from doc/src/declarative/snippets/qtbinding/custompalette/main.cpp)0
-rw-r--r--doc/src/snippets/declarative/qtbinding/custompalette/main.qml (renamed from doc/src/declarative/snippets/qtbinding/custompalette/main.qml)0
-rw-r--r--doc/src/snippets/declarative/qtbinding/resources/example.qrc (renamed from doc/src/declarative/snippets/qtbinding/resources/example.qrc)0
-rw-r--r--doc/src/snippets/declarative/qtbinding/resources/images/background.png (renamed from doc/src/declarative/snippets/qtbinding/resources/images/background.png)0
-rw-r--r--doc/src/snippets/declarative/qtbinding/resources/main.cpp (renamed from doc/src/declarative/snippets/qtbinding/resources/main.cpp)0
-rw-r--r--doc/src/snippets/declarative/qtbinding/resources/main.qml (renamed from doc/src/declarative/snippets/qtbinding/resources/main.qml)0
-rw-r--r--doc/src/snippets/declarative/qtbinding/resources/resources.pro (renamed from doc/src/declarative/snippets/qtbinding/resources/resources.pro)0
-rw-r--r--doc/src/snippets/declarative/qtbinding/stopwatch/main.cpp (renamed from doc/src/declarative/snippets/qtbinding/stopwatch/main.cpp)0
-rw-r--r--doc/src/snippets/declarative/qtbinding/stopwatch/main.qml (renamed from doc/src/declarative/snippets/qtbinding/stopwatch/main.qml)0
-rw-r--r--doc/src/snippets/declarative/qtbinding/stopwatch/stopwatch.cpp (renamed from doc/src/declarative/snippets/qtbinding/stopwatch/stopwatch.cpp)0
-rw-r--r--doc/src/snippets/declarative/qtbinding/stopwatch/stopwatch.h (renamed from doc/src/declarative/snippets/qtbinding/stopwatch/stopwatch.h)0
-rw-r--r--doc/src/snippets/declarative/qtbinding/stopwatch/stopwatch.pro (renamed from doc/src/declarative/snippets/qtbinding/stopwatch/stopwatch.pro)0
-rw-r--r--src/declarative/graphicsitems/qdeclarativegridview.cpp11
-rw-r--r--src/declarative/graphicsitems/qdeclarativelistview.cpp11
-rw-r--r--src/declarative/graphicsitems/qdeclarativemousearea.cpp33
-rw-r--r--src/declarative/graphicsitems/qdeclarativemousearea_p.h7
-rw-r--r--src/declarative/graphicsitems/qdeclarativetextinput.cpp2
30 files changed, 73 insertions, 29 deletions
diff --git a/doc/src/declarative/integrating.qdoc b/doc/src/declarative/integrating.qdoc
index 0051f09..1c07f8e 100644
--- a/doc/src/declarative/integrating.qdoc
+++ b/doc/src/declarative/integrating.qdoc
@@ -118,34 +118,34 @@ Here is an example. Suppose you have two classes, \c RedSquare and \c BlueCircle
that both inherit from QGraphicsWidget:
\c [graphicswidgets/redsquare.h]
-\snippet doc/src/declarative/snippets/integrating/graphicswidgets/redsquare.h 0
+\snippet doc/src/snippets/declarative/graphicswidgets/redsquare.h 0
\c [graphicswidgets/bluecircle.h]
-\snippet doc/src/declarative/snippets/integrating/graphicswidgets/bluecircle.h 0
+\snippet doc/src/snippets/declarative/graphicswidgets/bluecircle.h 0
Then, create a plugin by subclassing QDeclarativeExtensionPlugin, and register the
types by calling qmlRegisterType(). Also export the plugin with Q_EXPORT_PLUGIN2.
\c [graphicswidgets/shapesplugin.cpp]
-\snippet doc/src/declarative/snippets/integrating/graphicswidgets/shapesplugin.cpp 0
+\snippet doc/src/snippets/declarative/graphicswidgets/shapesplugin.cpp 0
Now write a project file that creates the plugin:
\c [graphicswidgets/graphicswidgets.pro]
-\quotefile doc/src/declarative/snippets/integrating/graphicswidgets/graphicswidgets.pro
+\quotefile doc/src/snippets/declarative/graphicswidgets/graphicswidgets.pro
And add a \c qmldir file that includes the \c graphicswidgets plugin from the \c lib
subdirectory (as defined in the project file):
\c [graphicswidgets/qmldir]
-\quotefile doc/src/declarative/snippets/integrating/graphicswidgets/qmldir
+\quotefile doc/src/snippets/declarative/graphicswidgets/qmldir
Now, we can write a QML file that uses the \c RedSquare and \c BlueCircle widgets.
(As an example, we can also create \c QGraphicsWidget items if we import the \c Qt.widgets
module.)
\c [main.qml]
-\quotefile doc/src/declarative/snippets/integrating/graphicswidgets/main.qml
+\quotefile doc/src/snippets/declarative/graphicswidgets/main.qml
Here is a screenshot of the result:
diff --git a/doc/src/declarative/qtbinding.qdoc b/doc/src/declarative/qtbinding.qdoc
index d024ff2..7d696d7 100644
--- a/doc/src/declarative/qtbinding.qdoc
+++ b/doc/src/declarative/qtbinding.qdoc
@@ -97,17 +97,17 @@ The following example shows how to expose a background color to a QML file throu
\row
\o
\c {// main.cpp}
-\snippet doc/src/declarative/snippets/qtbinding/contextproperties/main.cpp 0
+\snippet doc/src/snippets/declarative/qtbinding/contextproperties/main.cpp 0
\o
\c {// main.qml}
-\snippet doc/src/declarative/snippets/qtbinding/contextproperties/main.qml 0
+\snippet doc/src/snippets/declarative/qtbinding/contextproperties/main.qml 0
\endtable
Or, if you want \c main.cpp to create the component without showing it in a QDeclarativeView, you could create an instance of QDeclarativeContext using QDeclarativeEngine::rootContext() instead:
-\snippet doc/src/declarative/snippets/qtbinding/contextproperties/main.cpp 1
+\snippet doc/src/snippets/declarative/qtbinding/contextproperties/main.cpp 1
Context properties work just like normal properties in QML bindings - if the \c backgroundColor
context property in this example was changed to red, the component object instances would
@@ -135,15 +135,15 @@ allow QML to set values.
The following example creates a \c CustomPalette object, and sets it as the \c palette context
property.
-\snippet doc/src/declarative/snippets/qtbinding/custompalette/custompalette.h 0
+\snippet doc/src/snippets/declarative/qtbinding/custompalette/custompalette.h 0
-\snippet doc/src/declarative/snippets/qtbinding/custompalette/main.cpp 0
+\snippet doc/src/snippets/declarative/qtbinding/custompalette/main.cpp 0
The QML that follows references the palette object, and its properties, to set the appropriate
background and text colors. When the window is clicked, the palette's text color is changed, and
the window text will update accordingly.
-\snippet doc/src/declarative/snippets/qtbinding/custompalette/main.qml 0
+\snippet doc/src/snippets/declarative/qtbinding/custompalette/main.qml 0
To detect when a C++ property value - in this case the \c CustomPalette's \c text property -
changes, the property must have a corresponding NOTIFY signal. The NOTIFY signal specifies a signal
@@ -185,12 +185,12 @@ This example toggles the "Stopwatch" object on/off when the MouseArea is clicked
\row
\o
\c {// main.cpp}
-\snippet doc/src/declarative/snippets/qtbinding/stopwatch/stopwatch.h 0
-\snippet doc/src/declarative/snippets/qtbinding/stopwatch/main.cpp 0
+\snippet doc/src/snippets/declarative/qtbinding/stopwatch/stopwatch.h 0
+\snippet doc/src/snippets/declarative/qtbinding/stopwatch/main.cpp 0
\o
\c {// main.qml}
-\snippet doc/src/declarative/snippets/qtbinding/stopwatch/main.qml 0
+\snippet doc/src/snippets/declarative/qtbinding/stopwatch/main.qml 0
\endtable
@@ -258,16 +258,16 @@ QML content can be loaded from \l {The Qt Resource System} using the \e qrc: URL
For example:
\c [project/example.qrc]
-\quotefile doc/src/declarative/snippets/qtbinding/resources/example.qrc
+\quotefile doc/src/snippets/declarative/qtbinding/resources/example.qrc
\c [project/project.pro]
-\quotefile doc/src/declarative/snippets/qtbinding/resources/resources.pro
+\quotefile doc/src/snippets/declarative/qtbinding/resources/resources.pro
\c [project/main.cpp]
-\snippet doc/src/declarative/snippets/qtbinding/resources/main.cpp 0
+\snippet doc/src/snippets/declarative/qtbinding/resources/main.cpp 0
\c [project/main.qml]
-\snippet doc/src/declarative/snippets/qtbinding/resources/main.qml 0
+\snippet doc/src/snippets/declarative/qtbinding/resources/main.qml 0
*/
diff --git a/doc/src/declarative/snippets/integrating/graphicswidgets/bluecircle.h b/doc/src/snippets/declarative/graphicswidgets/bluecircle.h
index 73d66b7..73d66b7 100644
--- a/doc/src/declarative/snippets/integrating/graphicswidgets/bluecircle.h
+++ b/doc/src/snippets/declarative/graphicswidgets/bluecircle.h
diff --git a/doc/src/declarative/snippets/integrating/graphicswidgets/graphicswidgets.pro b/doc/src/snippets/declarative/graphicswidgets/graphicswidgets.pro
index 21c8a37..21c8a37 100644
--- a/doc/src/declarative/snippets/integrating/graphicswidgets/graphicswidgets.pro
+++ b/doc/src/snippets/declarative/graphicswidgets/graphicswidgets.pro
diff --git a/doc/src/declarative/snippets/integrating/graphicswidgets/main.qml b/doc/src/snippets/declarative/graphicswidgets/main.qml
index ffcf79d..ffcf79d 100644
--- a/doc/src/declarative/snippets/integrating/graphicswidgets/main.qml
+++ b/doc/src/snippets/declarative/graphicswidgets/main.qml
diff --git a/doc/src/declarative/snippets/integrating/graphicswidgets/qmldir b/doc/src/snippets/declarative/graphicswidgets/qmldir
index f94dad2..f94dad2 100644
--- a/doc/src/declarative/snippets/integrating/graphicswidgets/qmldir
+++ b/doc/src/snippets/declarative/graphicswidgets/qmldir
diff --git a/doc/src/declarative/snippets/integrating/graphicswidgets/redsquare.h b/doc/src/snippets/declarative/graphicswidgets/redsquare.h
index 3050662..3050662 100644
--- a/doc/src/declarative/snippets/integrating/graphicswidgets/redsquare.h
+++ b/doc/src/snippets/declarative/graphicswidgets/redsquare.h
diff --git a/doc/src/declarative/snippets/integrating/graphicswidgets/shapesplugin.cpp b/doc/src/snippets/declarative/graphicswidgets/shapesplugin.cpp
index 4c18ef3..4c18ef3 100644
--- a/doc/src/declarative/snippets/integrating/graphicswidgets/shapesplugin.cpp
+++ b/doc/src/snippets/declarative/graphicswidgets/shapesplugin.cpp
diff --git a/doc/src/declarative/snippets/qtbinding/contextproperties/contextproperties.pro b/doc/src/snippets/declarative/qtbinding/contextproperties/contextproperties.pro
index 68eeaf2..68eeaf2 100644
--- a/doc/src/declarative/snippets/qtbinding/contextproperties/contextproperties.pro
+++ b/doc/src/snippets/declarative/qtbinding/contextproperties/contextproperties.pro
diff --git a/doc/src/declarative/snippets/qtbinding/contextproperties/main.cpp b/doc/src/snippets/declarative/qtbinding/contextproperties/main.cpp
index 4073a6c..4073a6c 100644
--- a/doc/src/declarative/snippets/qtbinding/contextproperties/main.cpp
+++ b/doc/src/snippets/declarative/qtbinding/contextproperties/main.cpp
diff --git a/doc/src/declarative/snippets/qtbinding/contextproperties/main.qml b/doc/src/snippets/declarative/qtbinding/contextproperties/main.qml
index 1053f73..1053f73 100644
--- a/doc/src/declarative/snippets/qtbinding/contextproperties/main.qml
+++ b/doc/src/snippets/declarative/qtbinding/contextproperties/main.qml
diff --git a/doc/src/declarative/snippets/qtbinding/custompalette/custompalette.h b/doc/src/snippets/declarative/qtbinding/custompalette/custompalette.h
index d0d253a..d0d253a 100644
--- a/doc/src/declarative/snippets/qtbinding/custompalette/custompalette.h
+++ b/doc/src/snippets/declarative/qtbinding/custompalette/custompalette.h
diff --git a/doc/src/declarative/snippets/qtbinding/custompalette/custompalette.pro b/doc/src/snippets/declarative/qtbinding/custompalette/custompalette.pro
index e6af0d0..e6af0d0 100644
--- a/doc/src/declarative/snippets/qtbinding/custompalette/custompalette.pro
+++ b/doc/src/snippets/declarative/qtbinding/custompalette/custompalette.pro
diff --git a/doc/src/declarative/snippets/qtbinding/custompalette/main.cpp b/doc/src/snippets/declarative/qtbinding/custompalette/main.cpp
index dc651f6..dc651f6 100644
--- a/doc/src/declarative/snippets/qtbinding/custompalette/main.cpp
+++ b/doc/src/snippets/declarative/qtbinding/custompalette/main.cpp
diff --git a/doc/src/declarative/snippets/qtbinding/custompalette/main.qml b/doc/src/snippets/declarative/qtbinding/custompalette/main.qml
index f1a3b4f..f1a3b4f 100644
--- a/doc/src/declarative/snippets/qtbinding/custompalette/main.qml
+++ b/doc/src/snippets/declarative/qtbinding/custompalette/main.qml
diff --git a/doc/src/declarative/snippets/qtbinding/resources/example.qrc b/doc/src/snippets/declarative/qtbinding/resources/example.qrc
index 5e49415..5e49415 100644
--- a/doc/src/declarative/snippets/qtbinding/resources/example.qrc
+++ b/doc/src/snippets/declarative/qtbinding/resources/example.qrc
diff --git a/doc/src/declarative/snippets/qtbinding/resources/images/background.png b/doc/src/snippets/declarative/qtbinding/resources/images/background.png
index e69de29..e69de29 100644
--- a/doc/src/declarative/snippets/qtbinding/resources/images/background.png
+++ b/doc/src/snippets/declarative/qtbinding/resources/images/background.png
diff --git a/doc/src/declarative/snippets/qtbinding/resources/main.cpp b/doc/src/snippets/declarative/qtbinding/resources/main.cpp
index 5459b9e..5459b9e 100644
--- a/doc/src/declarative/snippets/qtbinding/resources/main.cpp
+++ b/doc/src/snippets/declarative/qtbinding/resources/main.cpp
diff --git a/doc/src/declarative/snippets/qtbinding/resources/main.qml b/doc/src/snippets/declarative/qtbinding/resources/main.qml
index dfe923f..dfe923f 100644
--- a/doc/src/declarative/snippets/qtbinding/resources/main.qml
+++ b/doc/src/snippets/declarative/qtbinding/resources/main.qml
diff --git a/doc/src/declarative/snippets/qtbinding/resources/resources.pro b/doc/src/snippets/declarative/qtbinding/resources/resources.pro
index cc01ee1..cc01ee1 100644
--- a/doc/src/declarative/snippets/qtbinding/resources/resources.pro
+++ b/doc/src/snippets/declarative/qtbinding/resources/resources.pro
diff --git a/doc/src/declarative/snippets/qtbinding/stopwatch/main.cpp b/doc/src/snippets/declarative/qtbinding/stopwatch/main.cpp
index 537a288..537a288 100644
--- a/doc/src/declarative/snippets/qtbinding/stopwatch/main.cpp
+++ b/doc/src/snippets/declarative/qtbinding/stopwatch/main.cpp
diff --git a/doc/src/declarative/snippets/qtbinding/stopwatch/main.qml b/doc/src/snippets/declarative/qtbinding/stopwatch/main.qml
index 2efa542..2efa542 100644
--- a/doc/src/declarative/snippets/qtbinding/stopwatch/main.qml
+++ b/doc/src/snippets/declarative/qtbinding/stopwatch/main.qml
diff --git a/doc/src/declarative/snippets/qtbinding/stopwatch/stopwatch.cpp b/doc/src/snippets/declarative/qtbinding/stopwatch/stopwatch.cpp
index 4954a5f..4954a5f 100644
--- a/doc/src/declarative/snippets/qtbinding/stopwatch/stopwatch.cpp
+++ b/doc/src/snippets/declarative/qtbinding/stopwatch/stopwatch.cpp
diff --git a/doc/src/declarative/snippets/qtbinding/stopwatch/stopwatch.h b/doc/src/snippets/declarative/qtbinding/stopwatch/stopwatch.h
index 8d17121..8d17121 100644
--- a/doc/src/declarative/snippets/qtbinding/stopwatch/stopwatch.h
+++ b/doc/src/snippets/declarative/qtbinding/stopwatch/stopwatch.h
diff --git a/doc/src/declarative/snippets/qtbinding/stopwatch/stopwatch.pro b/doc/src/snippets/declarative/qtbinding/stopwatch/stopwatch.pro
index d803e6a..d803e6a 100644
--- a/doc/src/declarative/snippets/qtbinding/stopwatch/stopwatch.pro
+++ b/doc/src/snippets/declarative/qtbinding/stopwatch/stopwatch.pro
diff --git a/src/declarative/graphicsitems/qdeclarativegridview.cpp b/src/declarative/graphicsitems/qdeclarativegridview.cpp
index f79a853..febd34a 100644
--- a/src/declarative/graphicsitems/qdeclarativegridview.cpp
+++ b/src/declarative/graphicsitems/qdeclarativegridview.cpp
@@ -855,10 +855,13 @@ void QDeclarativeGridViewPrivate::flick(AxisData &data, qreal minExtent, qreal m
qreal adjDist = -data.flickTarget + data.move.value();
if (qAbs(adjDist) > qAbs(dist)) {
// Prevent painfully slow flicking - adjust velocity to suit flickDeceleration
- v2 = accel * 2.0f * qAbs(dist);
- v = qSqrt(v2);
- if (dist > 0)
- v = -v;
+ qreal adjv2 = accel * 2.0f * qAbs(adjDist);
+ if (adjv2 > v2) {
+ v2 = adjv2;
+ v = qSqrt(v2);
+ if (dist > 0)
+ v = -v;
+ }
}
dist = adjDist;
accel = v2 / (2.0f * qAbs(dist));
diff --git a/src/declarative/graphicsitems/qdeclarativelistview.cpp b/src/declarative/graphicsitems/qdeclarativelistview.cpp
index c88dab2..3f150dc 100644
--- a/src/declarative/graphicsitems/qdeclarativelistview.cpp
+++ b/src/declarative/graphicsitems/qdeclarativelistview.cpp
@@ -1230,10 +1230,13 @@ void QDeclarativeListViewPrivate::flick(AxisData &data, qreal minExtent, qreal m
qreal adjDist = -data.flickTarget + data.move.value();
if (qAbs(adjDist) > qAbs(dist)) {
// Prevent painfully slow flicking - adjust velocity to suit flickDeceleration
- v2 = accel * 2.0f * qAbs(dist);
- v = qSqrt(v2);
- if (dist > 0)
- v = -v;
+ qreal adjv2 = accel * 2.0f * qAbs(adjDist);
+ if (adjv2 > v2) {
+ v2 = adjv2;
+ v = qSqrt(v2);
+ if (dist > 0)
+ v = -v;
+ }
}
dist = adjDist;
accel = v2 / (2.0f * qAbs(dist));
diff --git a/src/declarative/graphicsitems/qdeclarativemousearea.cpp b/src/declarative/graphicsitems/qdeclarativemousearea.cpp
index 126d041..0b9cf6e 100644
--- a/src/declarative/graphicsitems/qdeclarativemousearea.cpp
+++ b/src/declarative/graphicsitems/qdeclarativemousearea.cpp
@@ -599,6 +599,23 @@ void QDeclarativeMouseArea::geometryChanged(const QRectF &newGeometry,
d->lastPos = mapFromScene(d->lastScenePos);
}
+/*! \internal */
+QVariant QDeclarativeMouseArea::itemChange(GraphicsItemChange change,
+ const QVariant &value)
+{
+ Q_D(QDeclarativeMouseArea);
+ switch (change) {
+ case ItemVisibleHasChanged:
+ if (acceptHoverEvents() && d->hovered != (isVisible() && isUnderMouse()))
+ setHovered(!d->hovered);
+ break;
+ default:
+ break;
+ }
+
+ return QDeclarativeItem::itemChange(change, value);
+}
+
/*!
\qmlproperty bool MouseArea::hoverEnabled
This property holds whether hover events are handled.
@@ -609,6 +626,22 @@ void QDeclarativeMouseArea::geometryChanged(const QRectF &newGeometry,
This property affects the containsMouse property and the onEntered, onExited and onPositionChanged signals.
*/
+bool QDeclarativeMouseArea::hoverEnabled() const
+{
+ return acceptHoverEvents();
+}
+
+void QDeclarativeMouseArea::setHoverEnabled(bool h)
+{
+ Q_D(QDeclarativeMouseArea);
+ if (h == acceptHoverEvents())
+ return;
+
+ setAcceptHoverEvents(h);
+ emit hoverEnabledChanged();
+ if (d->hovered != isUnderMouse())
+ setHovered(!d->hovered);
+}
/*!
\qmlproperty bool MouseArea::containsMouse
diff --git a/src/declarative/graphicsitems/qdeclarativemousearea_p.h b/src/declarative/graphicsitems/qdeclarativemousearea_p.h
index 4f7df62..e3f523b 100644
--- a/src/declarative/graphicsitems/qdeclarativemousearea_p.h
+++ b/src/declarative/graphicsitems/qdeclarativemousearea_p.h
@@ -121,7 +121,7 @@ class Q_DECLARATIVE_EXPORT QDeclarativeMouseArea : public QDeclarativeItem
Q_PROPERTY(bool enabled READ isEnabled WRITE setEnabled NOTIFY enabledChanged)
Q_PROPERTY(Qt::MouseButtons pressedButtons READ pressedButtons NOTIFY pressedChanged)
Q_PROPERTY(Qt::MouseButtons acceptedButtons READ acceptedButtons WRITE setAcceptedButtons NOTIFY acceptedButtonsChanged)
- Q_PROPERTY(bool hoverEnabled READ acceptHoverEvents WRITE setAcceptHoverEvents)
+ Q_PROPERTY(bool hoverEnabled READ hoverEnabled WRITE setHoverEnabled NOTIFY hoverEnabledChanged)
Q_PROPERTY(QDeclarativeDrag *drag READ drag CONSTANT) //### add flicking to QDeclarativeDrag or add a QDeclarativeFlick ???
public:
@@ -142,6 +142,9 @@ public:
Qt::MouseButtons acceptedButtons() const;
void setAcceptedButtons(Qt::MouseButtons buttons);
+ bool hoverEnabled() const;
+ void setHoverEnabled(bool h);
+
QDeclarativeDrag *drag();
Q_SIGNALS:
@@ -149,6 +152,7 @@ Q_SIGNALS:
void pressedChanged();
void enabledChanged();
void acceptedButtonsChanged();
+ void hoverEnabledChanged();
void positionChanged(QDeclarativeMouseEvent *mouse);
void mousePositionChanged(QDeclarativeMouseEvent *mouse);
@@ -176,6 +180,7 @@ protected:
virtual void geometryChanged(const QRectF &newGeometry,
const QRectF &oldGeometry);
+ virtual QVariant itemChange(GraphicsItemChange change, const QVariant& value);
private:
void handlePress();
diff --git a/src/declarative/graphicsitems/qdeclarativetextinput.cpp b/src/declarative/graphicsitems/qdeclarativetextinput.cpp
index 43812b6..775450a 100644
--- a/src/declarative/graphicsitems/qdeclarativetextinput.cpp
+++ b/src/declarative/graphicsitems/qdeclarativetextinput.cpp
@@ -1122,7 +1122,7 @@ QString QDeclarativeTextInput::displayText() const
void QDeclarativeTextInput::moveCursorSelection(int position)
{
Q_D(QDeclarativeTextInput);
- d->control->moveCursor(pos, true);
+ d->control->moveCursor(position, true);
}
void QDeclarativeTextInputPrivate::init()