aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorFrederik Gladhorn <frederik.gladhorn@digia.com>2013-06-27 12:59:04 +0200
committerFrederik Gladhorn <frederik.gladhorn@digia.com>2013-06-27 12:59:04 +0200
commita1922317f8b2c219176553ff3f0db815f6f16cfd (patch)
treef90b3725afcfdd5efce59ad698bd1b347f26900e /src
parent02bf3ca59ea1aa4af0ce39d2f4fc856ce47f9966 (diff)
parentffe861a0785056a90c787172400fa6061acfcc32 (diff)
Merge remote-tracking branch 'origin/stable' into dev
Diffstat (limited to 'src')
-rw-r--r--src/qml/doc/src/whatsnew.qdoc5
-rw-r--r--src/qml/qml/ftw/qqmltrace.cpp1
-rw-r--r--src/qml/qml/qqmlengine.cpp4
-rw-r--r--src/qml/qml/qqmlplatform.cpp2
-rw-r--r--src/quick/doc/images/qml-item-canvas-clip-complex.pngbin0 -> 70000 bytes
-rw-r--r--src/quick/doc/images/qml-item-canvas-scaley.pngbin0 -> 1080 bytes
-rw-r--r--src/quick/doc/images/qml-item-canvas-skewx.pngbin0 -> 1857 bytes
-rw-r--r--src/quick/doc/images/qml-item-canvas-skewy.pngbin0 -> 2654 bytes
-rw-r--r--src/quick/doc/images/qml-item-canvas-translate.pngbin0 -> 1269 bytes
-rw-r--r--src/quick/doc/images/qml-item-canvas-translatey.pngbin0 -> 1666 bytes
-rw-r--r--src/quick/doc/src/whatsnew.qdoc3
-rw-r--r--src/quick/items/context2d/qquickcanvasitem.cpp5
-rw-r--r--src/quick/items/context2d/qquickcontext2d.cpp51
-rw-r--r--src/quick/items/qquickitem.cpp10
-rw-r--r--src/quick/items/qquickitem.h2
15 files changed, 52 insertions, 31 deletions
diff --git a/src/qml/doc/src/whatsnew.qdoc b/src/qml/doc/src/whatsnew.qdoc
index eece3bcaab..f1c69160b6 100644
--- a/src/qml/doc/src/whatsnew.qdoc
+++ b/src/qml/doc/src/whatsnew.qdoc
@@ -37,6 +37,11 @@ a summary of the new changes:
\li New QQmlApplicationEngine convenience class for QML applications.
\li New Instantiatior type for generic, dynamic object creation.
\li New properties for \l Qt.application: arguments, name, and version.
+\li The 'with' statement has been deprecated and is slated for removal in a
+ future version of the language.
+\li New \l Qt.platform object with an os property
+\li New \l qmlClearTypeRegistations() function drops all data from qmlRegisterType calls
+\li New \l qmlRegisterType function for registering composite types.
\endlist
\section2 New Submodule
diff --git a/src/qml/qml/ftw/qqmltrace.cpp b/src/qml/qml/ftw/qqmltrace.cpp
index 98f86dad32..9bf58c245c 100644
--- a/src/qml/qml/ftw/qqmltrace.cpp
+++ b/src/qml/qml/ftw/qqmltrace.cpp
@@ -43,6 +43,7 @@
#ifdef QML_ENABLE_TRACE
#include <stdio.h>
+#include <unistd.h>
#endif
QT_BEGIN_NAMESPACE
diff --git a/src/qml/qml/qqmlengine.cpp b/src/qml/qml/qqmlengine.cpp
index 673fbfefbb..71fea41f78 100644
--- a/src/qml/qml/qqmlengine.cpp
+++ b/src/qml/qml/qqmlengine.cpp
@@ -391,9 +391,9 @@ The following functions are also on the Qt object.
\list
\li \c "android" - Android
\li \c "blackberry" - BlackBerry OS
- \li \c "ios" - Apple iOS
+ \li \c "ios" - iOS
\li \c "linux" - Linux
- \li \c "mac" - Mac OS X
+ \li \c "osx" - OS X
\li \c "unix" - Other Unix-based OS
\li \c "windows" - Windows
\li \c "wince" - Windows CE
diff --git a/src/qml/qml/qqmlplatform.cpp b/src/qml/qml/qqmlplatform.cpp
index de48f60f56..04862379be 100644
--- a/src/qml/qml/qqmlplatform.cpp
+++ b/src/qml/qml/qqmlplatform.cpp
@@ -66,7 +66,7 @@ QString QQmlPlatform::os()
#elif defined(Q_OS_IOS)
return QLatin1String("ios");
#elif defined(Q_OS_MAC)
- return QLatin1String("mac");
+ return QLatin1String("osx");
#elif defined(Q_OS_WINCE)
return QLatin1String("wince");
#elif defined(Q_OS_WIN)
diff --git a/src/quick/doc/images/qml-item-canvas-clip-complex.png b/src/quick/doc/images/qml-item-canvas-clip-complex.png
new file mode 100644
index 0000000000..cb582bad41
--- /dev/null
+++ b/src/quick/doc/images/qml-item-canvas-clip-complex.png
Binary files differ
diff --git a/src/quick/doc/images/qml-item-canvas-scaley.png b/src/quick/doc/images/qml-item-canvas-scaley.png
new file mode 100644
index 0000000000..61462b9adc
--- /dev/null
+++ b/src/quick/doc/images/qml-item-canvas-scaley.png
Binary files differ
diff --git a/src/quick/doc/images/qml-item-canvas-skewx.png b/src/quick/doc/images/qml-item-canvas-skewx.png
new file mode 100644
index 0000000000..c9bcb6715c
--- /dev/null
+++ b/src/quick/doc/images/qml-item-canvas-skewx.png
Binary files differ
diff --git a/src/quick/doc/images/qml-item-canvas-skewy.png b/src/quick/doc/images/qml-item-canvas-skewy.png
new file mode 100644
index 0000000000..594ac842a4
--- /dev/null
+++ b/src/quick/doc/images/qml-item-canvas-skewy.png
Binary files differ
diff --git a/src/quick/doc/images/qml-item-canvas-translate.png b/src/quick/doc/images/qml-item-canvas-translate.png
new file mode 100644
index 0000000000..7bb3ae7560
--- /dev/null
+++ b/src/quick/doc/images/qml-item-canvas-translate.png
Binary files differ
diff --git a/src/quick/doc/images/qml-item-canvas-translatey.png b/src/quick/doc/images/qml-item-canvas-translatey.png
new file mode 100644
index 0000000000..9196bf5919
--- /dev/null
+++ b/src/quick/doc/images/qml-item-canvas-translatey.png
Binary files differ
diff --git a/src/quick/doc/src/whatsnew.qdoc b/src/quick/doc/src/whatsnew.qdoc
index 973d41dca2..26d88699bc 100644
--- a/src/quick/doc/src/whatsnew.qdoc
+++ b/src/quick/doc/src/whatsnew.qdoc
@@ -38,7 +38,8 @@ features introduced by the new import and new classes in Qt 5.1:
\li New render loop for windows for smoother animations.
\li New \l Window properties: activeFocusItem, minimumWidth, minimumHeight,
maximumWidth, maximumHeight, visibility, contentOrientation, and opacity.
-\li New \l Item property: activeFocusOnTab.
+\li New \l Screen attached properties: name, desktopAvailableWidth,
+ desktopAvailableHeight, logicalPixelDensity
\li New \l Grid properties: horizontalAlignment, verticalAlignment, and
effectiveHorizontalAlignment.
\li New \l TextEdit properties: selectByKeyboard and textDocument
diff --git a/src/quick/items/context2d/qquickcanvasitem.cpp b/src/quick/items/context2d/qquickcanvasitem.cpp
index 1b33680361..8844eb91bb 100644
--- a/src/quick/items/context2d/qquickcanvasitem.cpp
+++ b/src/quick/items/context2d/qquickcanvasitem.cpp
@@ -626,8 +626,11 @@ void QQuickCanvasItem::itemChange(QQuickItem::ItemChange change, const QQuickIte
return;
Q_D(QQuickCanvasItem);
- if (d->available)
+ if (d->available) {
+ if (d->dirtyAttributes & QQuickItemPrivate::ContentUpdateMask)
+ requestPaint();
return;
+ }
if (value.window== 0)
return;
diff --git a/src/quick/items/context2d/qquickcontext2d.cpp b/src/quick/items/context2d/qquickcontext2d.cpp
index 8434c0fe0c..eb8b23ad9c 100644
--- a/src/quick/items/context2d/qquickcontext2d.cpp
+++ b/src/quick/items/context2d/qquickcontext2d.cpp
@@ -692,17 +692,19 @@ static v8::Handle<v8::Value> ctx2d_save(const v8::Arguments &args)
// transformations
/*!
\qmlmethod object QtQuick2::Context2D::rotate(real angle)
- Rotate the canvas around the current origin by \c angle in radians and clockwise direction.
+ Rotate the canvas around the current origin by \a angle in radians and clockwise direction.
+
\code
ctx.rotate(Math.PI/2);
\endcode
+
\image qml-item-canvas-rotate.png
The rotation transformation matrix is as follows:
\image qml-item-canvas-math-rotate.png
- where the \c angle of rotation is in radians.
+ where the \a angle of rotation is in radians.
*/
static v8::Handle<v8::Value> ctx2d_rotate(const v8::Arguments &args)
@@ -717,17 +719,20 @@ static v8::Handle<v8::Value> ctx2d_rotate(const v8::Arguments &args)
/*!
\qmlmethod object QtQuick2::Context2D::scale(real x, real y)
+
Increases or decreases the size of each unit in the canvas grid by multiplying the scale factors
to the current tranform matrix.
- Where \c x is the scale factor in the horizontal direction and \c y is the scale factor in the
+ \a x is the scale factor in the horizontal direction and \a y is the scale factor in the
vertical direction.
- The following code doubles the horizontal size of an object drawn on the canvas and half its
+
+ The following code doubles the horizontal size of an object drawn on the canvas and halves its
vertical size:
+
\code
ctx.scale(2.0, 0.5);
\endcode
- \image qml-item-canvas-scale.png
+ \image qml-item-canvas-scale.png
*/
static v8::Handle<v8::Value> ctx2d_scale(const v8::Arguments &args)
{
@@ -756,15 +761,15 @@ static v8::Handle<v8::Value> ctx2d_scale(const v8::Arguments &args)
\li \c{a} is the scale factor in the horizontal (x) direction
\image qml-item-canvas-scalex.png
\li \c{c} is the skew factor in the x direction
- \image qml-item-canvas-canvas-skewx.png
+ \image qml-item-canvas-skewx.png
\li \c{e} is the translation in the x direction
- \image qml-item-canvas-canvas-translate.png
+ \image qml-item-canvas-translate.png
\li \c{b} is the skew factor in the y (vertical) direction
- \image qml-item-canvas-canvas-skewy.png
+ \image qml-item-canvas-skewy.png
\li \c{d} is the scale factor in the y direction
- \image qml-item-canvas-canvas-scaley.png
+ \image qml-item-canvas-scaley.png
\li \c{f} is the translation in the y direction
- \image qml-item-canvas-canvas-translatey.png
+ \image qml-item-canvas-translatey.png
\li the last row remains constant
\endlist
The scale factors and skew factors are multiples; \c{e} and \c{f} are
@@ -792,8 +797,9 @@ static v8::Handle<v8::Value> ctx2d_setTransform(const v8::Arguments &args)
/*!
\qmlmethod object QtQuick2::Context2D::transform(real a, real b, real c, real d, real e, real f)
+
This method is very similar to setTransform(), but instead of replacing the old
- tranform matrix, this method applies the given tranform matrix to the current matrix by mulitplying to it.
+ transform matrix, this method applies the given tranform matrix to the current matrix by multiplying to it.
The setTransform(a, b, c, d, e, f) method actually resets the current transform to the identity matrix,
and then invokes the transform(a, b, c, d, e, f) method with the same arguments.
@@ -819,10 +825,10 @@ static v8::Handle<v8::Value> ctx2d_transform(const v8::Arguments &args)
/*!
\qmlmethod object QtQuick2::Context2D::translate(real x, real y)
- Translates the origin of the canvas to point (\c x, \c y).
- \c x is the horizontal distance that the origin is translated, in coordinate space units,
- \c y is the vertical distance that the origin is translated, in coordinate space units.
+ Translates the origin of the canvas by a horizontal distance of \a x,
+ and a vertical distance of \a y, in coordinate space units.
+
Translating the origin enables you to draw patterns of different objects on the canvas
without having to measure the coordinates manually for each shape.
*/
@@ -840,7 +846,9 @@ static v8::Handle<v8::Value> ctx2d_translate(const v8::Arguments &args)
/*!
\qmlmethod object QtQuick2::Context2D::resetTransform()
- Reset the transformation matrix to default value.
+
+ Reset the transformation matrix to the default value (equivalent to calling
+ setTransform(\c 1, \c 0, \c 0, \c 1, \c 0, \c 0)).
\sa transform(), setTransform(), reset()
*/
@@ -856,8 +864,10 @@ static v8::Handle<v8::Value> ctx2d_resetTransform(const v8::Arguments &args)
/*!
- \qmlmethod object QtQuick2::Context2D::shear(real sh, real sv )
- Shear the transformation matrix with \a sh in horizontal direction and \a sv in vertical direction.
+ \qmlmethod object QtQuick2::Context2D::shear(real sh, real sv)
+
+ Shears the transformation matrix by \a sh in the horizontal direction and
+ \a sv in the vertical direction.
*/
static v8::Handle<v8::Value> ctx2d_shear(const v8::Arguments &args)
{
@@ -873,9 +883,10 @@ static v8::Handle<v8::Value> ctx2d_shear(const v8::Arguments &args)
/*!
\qmlproperty real QtQuick2::Context2D::globalAlpha
+
Holds the current alpha value applied to rendering operations.
- The value must be in the range from 0.0 (fully transparent) to 1.0 (fully opque).
- The default value is 1.0.
+ The value must be in the range from \c 0.0 (fully transparent) to \c 1.0 (fully opaque).
+ The default value is \c 1.0.
*/
static v8::Handle<v8::Value> ctx2d_globalAlpha(v8::Local<v8::String>, const v8::AccessorInfo &info)
{
@@ -1918,7 +1929,7 @@ static v8::Handle<v8::Value> ctx2d_bezierCurveTo(const v8::Arguments &args)
The new shape displays. The following shows how a clipping path can
modify how an image displays:
- \image qml-canvas-clip-complex.png
+ \image qml-item-canvas-clip-complex.png
\sa beginPath()
\sa closePath()
\sa stroke()
diff --git a/src/quick/items/qquickitem.cpp b/src/quick/items/qquickitem.cpp
index 110e14d266..5863c52e70 100644
--- a/src/quick/items/qquickitem.cpp
+++ b/src/quick/items/qquickitem.cpp
@@ -3065,9 +3065,9 @@ void QQuickItemPrivate::_q_resourceObjectDeleted(QObject *object)
relationship with other items.
Margins apply to top, bottom, left, right, and fill anchors.
- The \c anchors.margins property can be used to set all of the various margins at once, to the same value.
+ The \l anchors.margins property can be used to set all of the various margins at once, to the same value.
It will not override a specific margin that has been previously set; to clear an explicit margin
- set it's value to \c undefined.
+ set its value to \c undefined.
Note that margins are anchor-specific and are not applied if an item does not
use anchors.
@@ -3114,14 +3114,14 @@ void QQuickItemPrivate::_q_resourceObjectDeleted(QObject *object)
\endqml
\endtable
- \c anchors.fill provides a convenient way for one item to have the
+ \l anchors.fill provides a convenient way for one item to have the
same geometry as another item, and is equivalent to connecting all
four directional anchors.
To clear an anchor value, set it to \c undefined.
- \c anchors.alignWhenCentered (default true) forces centered anchors to align to a
- whole pixel, i.e. if the item being centered has an odd width/height the item
+ \l anchors.alignWhenCentered (default \c true) forces centered anchors to align to a
+ whole pixel; if the item being centered has an odd \l width or \l height, the item
will be positioned on a whole pixel rather than being placed on a half-pixel.
This ensures the item is painted crisply. There are cases where this is not
desirable, for example when rotating the item jitters may be apparent as the
diff --git a/src/quick/items/qquickitem.h b/src/quick/items/qquickitem.h
index 84eafec1d7..d7256f3568 100644
--- a/src/quick/items/qquickitem.h
+++ b/src/quick/items/qquickitem.h
@@ -324,7 +324,7 @@ public:
Q_INVOKABLE void mapToItem(QQmlV8Function*) const;
Q_INVOKABLE void forceActiveFocus();
Q_INVOKABLE void forceActiveFocus(Qt::FocusReason reason);
- Q_INVOKABLE QQuickItem *nextItemInFocusChain(bool forward = true);
+ Q_REVISION(1) Q_INVOKABLE QQuickItem *nextItemInFocusChain(bool forward = true);
Q_INVOKABLE QQuickItem *childAt(qreal x, qreal y) const;
#ifndef QT_NO_IM