aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--dist/changes-5.1.062
-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
16 files changed, 110 insertions, 35 deletions
diff --git a/dist/changes-5.1.0 b/dist/changes-5.1.0
index eaf6d05094..528260e760 100644
--- a/dist/changes-5.1.0
+++ b/dist/changes-5.1.0
@@ -21,7 +21,12 @@ information about a particular change.
General Improvements
--------------------
-
+- The Qt.application object in QML has gained the following new members
+ * arguments property, containing any command line arguments of the application
+ * name property, containing the string of the application name
+ * version property, containing the string of the application version
+ * aboutToQuit() signal, allowing last-minute cleanup
+- New Qt.platform.os property exposes the current platform.
Third party components
----------------------
@@ -42,9 +47,10 @@ Third party components
- As part of a fix for QTBUG-30555, ListView and GridView properties, such
as count, which are based off of the data model will no longer update
immediately if queried. Updates are batched to happen once per frame (or
- when properties are being set).
+ when properties are being set). You may manually update using the
+ forceLayout() method, new in QtQuick 2.1.
- - tryCompare now correctly fails when it only gets two parameters
+ - For QML tests, tryCompare now correctly fails when it only gets two parameters
- If a QObject has a property and a slot (or invokable method) with the same
name, in QML the previous behavior was to let the property obscure the
@@ -53,11 +59,41 @@ Third party components
for objects having dynamic properties, such as QQmlPropertyMap. This change
was a consequence of the fix for QTBUG-29836.
+ - The 'with' statement has been deprecated in the QML language. Using this
+ statement now produces a deprecation warning, and future versions of the
+ QML engine may not recognize it.
+
+ - The implicit import is now only loaded for QML files if there are
+ unresolved types after loading all explicit imports. Applications where
+ the implicit import triggered code other than the registration of types
+ will now need to add import "." to their QML files.
+
****************************************************************************
* Library *
****************************************************************************
+QtQml
+------
+ - New QML import version QtQml.Models 2.1 contains generic versions of the VisualModel
+ types. These new generic versions work with any QObject based delegate,
+ not just QQuickItem based delegates.
+ - New module version QtQml 2.1 provides the new Instantiator type, which
+ is a generic version of Repeater which works with any QObject based
+ delegate, not just QQuickItem based delegates.
+ - New convenience class QQmlApplicationEngine automatically provides
+ functionality common in the C++ shell of a primarily QML application.
+ - New qmlClearTypeRegistrations() function in qqml.h. This function drops all
+ static data generated by previous qmlRegisterType calls.
+ - New qmlRegisteredType function in qqml.h, allowing the registration of
+ composite types from C++.
+
+QtQuick
+------
+ - New QML import version QtQuick 2.1 contains no new types, but adds new
+ properties, methods and signals to existing types. See the release notes
+ in the QtQuick documentation for details.
- QTBUG-30837: The Flickable type no longer fixes up the content area on
startup to move it inside the viewport.
+ - QTBUG-28086: Remote image URLs now work as a source for AnimatedSprite
****************************************************************************
@@ -68,7 +104,11 @@ Third party components
****************************************************************************
* Platform Specific Changes *
****************************************************************************
-
+ - New threaded render loop for Mac and Linux should lead to improved
+ graphical performance of QtQuick 2 on those platforms.
+ - New render loop on Windows should lead to smoother animations.
+ - assets: scheme supported on Android for urls inside QML
+ - Mac: "@2x" images are now loaded on "retina" systems.
****************************************************************************
* Compiler Specific Changes *
@@ -79,9 +119,23 @@ Third party components
* Tools *
****************************************************************************
+- qmlplugindump gains a -relocatable flag.
****************************************************************************
* Plugins *
****************************************************************************
+- New QML import QtQuick.Dialogs 1.0 contains types for more easily adding
+ dialogs to an application. Initially comes with FileDialog and ColorDialog
+
+- New QML import version QtQuick.Window 2.1 adds many new properties to both
+ the Screen and Window types. See the release notes in the QtQuick
+ documentation for further details.
+
+- QTBUG-30915: Animating emitRate on Emitter no longer fails for specific
+ animation timings. As a side effect, when emitting infinite particles
+ changing the particle count will no longer have an effect after initial
+ emission (previously it no longer had an effect after a certain point
+ into the animation).
+
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