summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/declarative/fx/qfxflipable.cpp2
-rw-r--r--src/declarative/fx/qfxgridview.cpp6
-rw-r--r--src/declarative/fx/qfximage.cpp2
-rw-r--r--src/declarative/fx/qfxitem.cpp2
-rw-r--r--src/declarative/fx/qfxkeyactions.cpp2
-rw-r--r--src/declarative/fx/qfxkeyactions.h2
-rw-r--r--src/declarative/fx/qfxlistview.cpp8
-rw-r--r--src/declarative/fx/qfxpathview.cpp3
-rw-r--r--src/declarative/fx/qfxtext.cpp50
-rw-r--r--src/declarative/fx/qfxtransform.cpp202
-rw-r--r--src/declarative/fx/qfxtransform.h22
-rw-r--r--src/declarative/fx/qfxwebview.cpp31
-rw-r--r--src/declarative/qml/qml.pri2
-rw-r--r--src/declarative/qml/qmlcompiler.cpp2
-rw-r--r--src/declarative/qml/qmlcompositetypemanager_p.h2
-rw-r--r--src/declarative/qml/qmlcustomparser.cpp3
-rw-r--r--src/declarative/qml/qmlcustomparser.h128
-rw-r--r--src/declarative/qml/qmlcustomparser_p.h87
-rw-r--r--src/declarative/qml/qmlcustomparser_p_p.h79
-rw-r--r--src/declarative/qml/qmldom.cpp20
-rw-r--r--src/declarative/qml/qmlmetatype.cpp2
-rw-r--r--src/declarative/qml/qmlvme.cpp2
-rw-r--r--src/declarative/qml/qmlxmlparser.cpp2
-rw-r--r--src/declarative/util/qfxview.cpp2
-rw-r--r--src/declarative/util/qmllistmodel.cpp2
25 files changed, 361 insertions, 304 deletions
diff --git a/src/declarative/fx/qfxflipable.cpp b/src/declarative/fx/qfxflipable.cpp
index 1d15827..81ed750 100644
--- a/src/declarative/fx/qfxflipable.cpp
+++ b/src/declarative/fx/qfxflipable.cpp
@@ -58,7 +58,7 @@ public:
QFxItem *front;
QFxItem *back;
QFxAxis *axis;
- QFxRotation axisRotation;
+ QFxRotation3D axisRotation;
qreal rotation;
};
diff --git a/src/declarative/fx/qfxgridview.cpp b/src/declarative/fx/qfxgridview.cpp
index c8b8d27..b8acea2 100644
--- a/src/declarative/fx/qfxgridview.cpp
+++ b/src/declarative/fx/qfxgridview.cpp
@@ -650,12 +650,12 @@ void QFxGridViewPrivate::updateCurrent(int modelIndex)
\brief The GridView element provides a grid view of items provided by a model.
The model is typically provided by a QAbstractListModel "C++ model object",
- but can also be created directly in XML.
+ but can also be created directly in QML.
The items are laid out top to bottom (vertically) or left to right (horizontally)
and may be flicked to scroll.
- The below example creates a very simple grid, using an XML model.
+ The below example creates a very simple grid, using a QML model.
\code
<resources>
<ListModel id="contactModel">
@@ -706,7 +706,7 @@ QFxGridView::~QFxGridView()
The C++ model object must be a \l QListModelInterface subclass, a \l VisualModel,
or a simple list.
- Models can also be created directly in XML, using the \l ListModel element. For example:
+ Models can also be created directly in QML, using the \l ListModel element. For example:
\code
<ListModel id="contactModel">
<Contact>
diff --git a/src/declarative/fx/qfximage.cpp b/src/declarative/fx/qfximage.cpp
index a34cd12..74ba8b8 100644
--- a/src/declarative/fx/qfximage.cpp
+++ b/src/declarative/fx/qfximage.cpp
@@ -135,7 +135,7 @@ QFxImage::~QFxImage()
This property contains the image currently being displayed by this item,
which may be an empty pixmap if nothing is currently displayed. If this
property is set, the src property will be unset. This property is intended
- to be used only in C++, not in XML.
+ to be used only in C++, not in QML.
*/
QPixmap QFxImage::pixmap() const
{
diff --git a/src/declarative/fx/qfxitem.cpp b/src/declarative/fx/qfxitem.cpp
index 11b7dd3..38b5713 100644
--- a/src/declarative/fx/qfxitem.cpp
+++ b/src/declarative/fx/qfxitem.cpp
@@ -1676,7 +1676,7 @@ QmlList<QmlTransition *>* QFxItem::transitions()
the item, or giving it a \l Reflection. Some
filters may not be available on all canvases; if a filter is not
available on a certain canvas, it will simply not be applied for
- that canvas (but the XML will still be considered valid).
+ that canvas (but the QML will still be considered valid).
\qml
<Item>
diff --git a/src/declarative/fx/qfxkeyactions.cpp b/src/declarative/fx/qfxkeyactions.cpp
index 69d4679..d2739ea 100644
--- a/src/declarative/fx/qfxkeyactions.cpp
+++ b/src/declarative/fx/qfxkeyactions.cpp
@@ -736,7 +736,7 @@ void QFxKeyActions::setKey_Space(const QString &s)
/*!
\qmlproperty string KeyActions::escape
- \qmlproperty string KeyActions::return
+ \qmlproperty string KeyActions::keyReturn
\qmlproperty string KeyActions::enter
\qmlproperty string KeyActions::delete
\qmlproperty string KeyActions::space
diff --git a/src/declarative/fx/qfxkeyactions.h b/src/declarative/fx/qfxkeyactions.h
index 7ad323a..b0d002d 100644
--- a/src/declarative/fx/qfxkeyactions.h
+++ b/src/declarative/fx/qfxkeyactions.h
@@ -101,7 +101,7 @@ class Q_DECLARATIVE_EXPORT QFxKeyActions : public QFxItem
Q_PROPERTY(QString digit9 READ key_9 WRITE setKey_9)
Q_PROPERTY(QString asterisk READ key_Asterisk WRITE setKey_Asterisk)
Q_PROPERTY(QString escape READ key_Escape WRITE setKey_Escape)
- Q_PROPERTY(QString return READ key_Return WRITE setKey_Return)
+ Q_PROPERTY(QString keyReturn READ key_Return WRITE setKey_Return)
Q_PROPERTY(QString enter READ key_Enter WRITE setKey_Enter)
Q_PROPERTY(QString delete READ key_Delete WRITE setKey_Delete)
Q_PROPERTY(QString space READ key_Space WRITE setKey_Space)
diff --git a/src/declarative/fx/qfxlistview.cpp b/src/declarative/fx/qfxlistview.cpp
index 4a626f5..98fa606 100644
--- a/src/declarative/fx/qfxlistview.cpp
+++ b/src/declarative/fx/qfxlistview.cpp
@@ -797,10 +797,10 @@ void QFxListViewPrivate::fixupX()
\inherits Flickable
\brief The ListView element provides a list view of items provided by a model.
- The model is typically provided by a QAbstractListModel "C++ model object", but can also be created directly in XML.
+ The model is typically provided by a QAbstractListModel "C++ model object", but can also be created directly in QML.
The items are laid out vertically or horizontally and may be flicked to scroll.
- The below example creates a very simple vertical list, using an XML model.
+ The below example creates a very simple vertical list, using a QML model.
\image trivialListView.png
The user interface defines a delegate to display an item, a highlight,
@@ -808,7 +808,7 @@ void QFxListViewPrivate::fixupX()
\snippet doc/src/snippets/declarative/listview/listview.qml 3
- The model is defined as a ListModel using XML:
+ The model is defined as a ListModel using QML:
\quotefromfile doc/src/snippets/declarative/listview/dummydata/ContactModel.qml
\skipto <ListModel
\printuntil </ListModel
@@ -840,7 +840,7 @@ QFxListView::~QFxListView()
The C++ model object must be a \l QAbstractItemModel subclass, a \l VisualModel,
or a simple list.
- Models can also be created directly in XML, using the \l ListModel element.
+ Models can also be created directly in QML, using the \l ListModel element.
*/
QVariant QFxListView::model() const
{
diff --git a/src/declarative/fx/qfxpathview.cpp b/src/declarative/fx/qfxpathview.cpp
index 5c24d86..a2ea8ee 100644
--- a/src/declarative/fx/qfxpathview.cpp
+++ b/src/declarative/fx/qfxpathview.cpp
@@ -99,7 +99,7 @@ private:
\brief The PathView element lays out model-provided items on a path.
\inherits Item
- The model is typically provided by a QAbstractListModel "C++ model object", but can also be created directly in XML.
+ The model is typically provided by a QAbstractListModel "C++ model object", but can also be created directly in QML.
The items are laid out along a path defined by a \l Path and may be flicked to scroll.
@@ -140,6 +140,7 @@ QFxPathView::~QFxPathView()
The model provides a set of data that is used to create the items for the view.
For large or dynamic datasets the model is usually provided by a C++ model object.
+ Models can also be created directly in XML, using the ListModel element.
*/
/*!
diff --git a/src/declarative/fx/qfxtext.cpp b/src/declarative/fx/qfxtext.cpp
index 5cb31e1..f1aefb9 100644
--- a/src/declarative/fx/qfxtext.cpp
+++ b/src/declarative/fx/qfxtext.cpp
@@ -67,16 +67,12 @@ QML_DEFINE_TYPE(QFxText,Text);
It can display both plain and rich text. For example:
\code
- <Text text="Hello World!" font.family="Helvetica" font.size="24" color="red"/>
- <Text>
- <![CDATA[<b>Hello</b> <i>World!</i>]]]]><![CDATA[>
- </Text>
+ Text { text: "Hello World!"; font.family: "Helvetica"; font.size: 24; color: "red" }
+ Text { text: "<b>Hello</b> <i>World!</i>" }
\endcode
\image declarative-text.png
- Additional examples can be found in examples/poc/text.xml
-
If height and width are not explicitly set, Text will attempt to determine how
much room is needed and set it accordingly. Unless \c wrap is set, it will always
prefer width to height (all text will be placed on a single line).
@@ -99,26 +95,19 @@ QML_DEFINE_TYPE(QFxText,Text);
It can display both plain and rich text. For example:
\code
- <Text text="Hello World!" font.family="Helvetica" font.size="24" color="red"/>
- <Text>
- <![CDATA[<b>Hello</b> <i>World!</i>]]>
- </Text>
+ Text { text: "Hello World!"; font.family: "Helvetica"; font.size: 24; color: "red" }
+ Text { text: "<b>Hello</b> <i>World!</i>" }
\endcode
\image text.png
- Note that the 'styling' properties such as color and outline are ignored for rich text, styling
- of rich text should be done within the text itself.
-
- Additional examples can be found in examples/poc/text.xml
-
If height and width are not explicitly set, Text will attempt to determine how
much room is needed and set it accordingly. Unless \c wrap is set, it will always
prefer width to height (all text will be placed on a single line).
The \c elideMode can alternatively be used to fit a line of plain text to a set width.
- A QFxText object can be instantiated in Qml using the tag \c &lt;Text&gt;.
+ A QFxText object can be instantiated in Qml using the tag \c Text.
*/
QFxText::QFxText(QFxItem *parent)
: QFxItem(*(new QFxTextPrivate), parent)
@@ -143,9 +132,14 @@ QFxText::~QFxText()
}
/*!
- \qmlproperty font Text::font
+ \qmlproperty string Text::font.family
+ \qmlproperty bool Text::font.bold
+ \qmlproperty bool Text::font.italic
+ \qmlproperty real Text::font.size
- Set the Text's font attributes. \c font.size sets the font's point size.
+ Set the Text's font attributes.
+
+ \note \c font.size sets the font's point size (not pixel size).
*/
/*!
@@ -219,11 +213,11 @@ void QFxText::setColor(const QColor &color)
The text color.
\code
- <!-- green text using hexadecimal notation -->
- <Text color="#00FF00" .../>
+ //green text using hexadecimal notation
+ Text { color: "#00FF00"; ... }
- <!-- steelblue text using SVG color name-->
- <Text color="steelblue" .../>
+ //steelblue text using SVG color name
+ Text { color: "steelblue"; ... }
\endcode
*/
@@ -241,12 +235,12 @@ QColor QFxText::color() const
Supported text styles are \c Normal, \c Outline, \c Raised and \c Sunken.
\code
- <HorizontalLayout>
- <Text font.size="24" text="Normal" />
- <Text font.size="24" text="Raised" style="Raised" styleColor="#AAAAAA"/>
- <Text font.size="24" text="Outline" style="Outline" styleColor="red"/>
- <Text font.size="24" text="Sunken" style="Sunken" styleColor="#AAAAAA"/>
- </HorizontalLayout>
+ HorizontalLayout {
+ Text { font.size: 24; text: "Normal" }
+ Text { font.size: 24; text: "Raised"; style: "Raised"; styleColor: "#AAAAAA" }
+ Text { font.size: 24; text: "Outline"; style: "Outline"; styleColor: "red" }
+ Text { font.size: 24; text: "Sunken"; style: "Sunken"; styleColor: "#AAAAAA" }
+ }
\endcode
\image declarative-textstyle.png
diff --git a/src/declarative/fx/qfxtransform.cpp b/src/declarative/fx/qfxtransform.cpp
index c355158..2bed170 100644
--- a/src/declarative/fx/qfxtransform.cpp
+++ b/src/declarative/fx/qfxtransform.cpp
@@ -178,8 +178,8 @@ void QFxAxis::setEndZ(qreal z)
}
/*!
- \qmlclass AxisRotation
- \brief The AxisRotation element provides a way to rotate an Item around an axis.
+ \qmlclass Rotation3D
+ \brief The Rotation3D element provides a way to rotate an Item around an axis.
Here is an example of various rotations applied to an \l Image.
\code
@@ -187,22 +187,22 @@ void QFxAxis::setEndZ(qreal z)
<Image src="qt.png"/>
<Image src="qt.png">
<transform>
- <AxisRotation axis.startX="30" axis.endX="30" axis.endY="60" angle="18"/>
+ <Rotation3D axis.startX="30" axis.endX="30" axis.endY="60" angle="18"/>
</transform>
</Image>
<Image src="qt.png">
<transform>
- <AxisRotation axis.startX="30" axis.endX="30" axis.endY="60" angle="36"/>
+ <Rotation3D axis.startX="30" axis.endX="30" axis.endY="60" angle="36"/>
</transform>
</Image>
<Image src="qt.png">
<transform>
- <AxisRotation axis.startX="30" axis.endX="30" axis.endY="60" angle="54"/>
+ <Rotation3D axis.startX="30" axis.endX="30" axis.endY="60" angle="54"/>
</transform>
</Image>
<Image src="qt.png">
<transform>
- <AxisRotation axis.startX="30" axis.endX="30" axis.endY="60" angle="72"/>
+ <Rotation3D axis.startX="30" axis.endX="30" axis.endY="60" angle="72"/>
</transform>
</Image>
</HorizontalLayout>
@@ -211,58 +211,58 @@ void QFxAxis::setEndZ(qreal z)
\image axisrotation.png
*/
-QML_DEFINE_TYPE(QFxRotation,AxisRotation);
+QML_DEFINE_TYPE(QFxRotation3D,Rotation3D);
-QFxRotation::QFxRotation(QObject *parent)
-: QFxTransform(parent), _angle(0), _distanceToPlane(1024.), _dirty(true)
+QFxRotation3D::QFxRotation3D(QObject *parent)
+: QFxTransform(parent), _angle(0), _dirty(true)
{
connect(&_axis, SIGNAL(updated()), this, SLOT(update()));
}
-QFxRotation::~QFxRotation()
+QFxRotation3D::~QFxRotation3D()
{
}
/*!
- \qmlproperty real AxisRotation::axis.startX
- \qmlproperty real AxisRotation::axis.startY
- \qmlproperty real AxisRotation::axis.endX
- \qmlproperty real AxisRotation::axis.endY
- \qmlproperty real AxisRotation::axis.endZ
+ \qmlproperty real Rotation3D::axis.startX
+ \qmlproperty real Rotation3D::axis.startY
+ \qmlproperty real Rotation3D::axis.endX
+ \qmlproperty real Rotation3D::axis.endY
+ \qmlproperty real Rotation3D::axis.endZ
A rotation axis is specified by 2 points in 3D space: a start point and
an end point. The z-position of the start point is assumed to be 0, and cannot
be changed.
*/
-QFxAxis *QFxRotation::axis()
+QFxAxis *QFxRotation3D::axis()
{
return &_axis;
}
/*!
- \qmlproperty real AxisRotation::angle
+ \qmlproperty real Rotation3D::angle
The angle, in degrees, to rotate around the specified axis.
*/
-qreal QFxRotation::angle() const
+qreal QFxRotation3D::angle() const
{
return _angle;
}
-void QFxRotation::setAngle(qreal angle)
+void QFxRotation3D::setAngle(qreal angle)
{
_angle = angle;
update();
}
-bool QFxRotation::isIdentity() const
+bool QFxRotation3D::isIdentity() const
{
return (_angle == 0.) || (_axis.endZ() == 0. && _axis.endY() == _axis.startY() && _axis.endX() == _axis.startX());
}
#if defined(QFX_RENDER_QPAINTER)
const qreal inv_dist_to_plane = 1. / 1024.;
-QTransform QFxRotation::transform() const
+QTransform QFxRotation3D::transform() const
{
if (_dirty) {
_transform = QTransform();
@@ -282,10 +282,6 @@ QTransform QFxRotation::transform() const
qreal y = _axis.endY() - _axis.startY();
qreal z = _axis.endZ();
- qreal idtp = inv_dist_to_plane;
- if (distanceToPlane() != 1024.)
- idtp = 1. / distanceToPlane();
-
qreal len = x * x + y * y + z * z;
if (len != 1.) {
len = ::sqrt(len);
@@ -294,8 +290,8 @@ QTransform QFxRotation::transform() const
z /= len;
}
- QTransform rot(x*x*(1-c)+c, x*y*(1-c)-z*s, x*z*(1-c)+y*s*idtp,
- y*x*(1-c)+z*s, y*y*(1-c)+c, y*z*(1-c)-x*s*idtp,
+ QTransform rot(x*x*(1-c)+c, x*y*(1-c)-z*s, x*z*(1-c)+y*s*inv_dist_to_plane,
+ y*x*(1-c)+z*s, y*y*(1-c)+c, y*z*(1-c)-x*s*inv_dist_to_plane,
0, 0, 1);
_transform *= rotTrans;
@@ -310,7 +306,7 @@ QTransform QFxRotation::transform() const
return _transform;
}
#elif defined(QFX_RENDER_OPENGL)
-QMatrix4x4 QFxRotation::transform() const
+QMatrix4x4 QFxRotation3D::transform() const
{
if (_dirty) {
_dirty = false;
@@ -333,21 +329,7 @@ QMatrix4x4 QFxRotation::transform() const
}
#endif
-/*!
- \qmlproperty real AxisRotation::distanceToPlane
-*/
-qreal QFxRotation::distanceToPlane() const
-{
- return _distanceToPlane;
-}
-
-void QFxRotation::setDistanceToPlane(qreal d)
-{
- _distanceToPlane = d;
- update();
-}
-
-void QFxRotation::update()
+void QFxRotation3D::update()
{
_dirty = true;
QFxItem *item = qobject_cast<QFxItem *>(parent());
@@ -356,77 +338,77 @@ void QFxRotation::update()
}
/*!
- \qmlclass AxisTranslation
- \brief The AxisTranslation element provides a way to move an Item along an axis.
+ \qmlclass Translation3D
+ \brief The Translation3D element provides a way to move an Item along an axis.
The following example translates the image to 10, 3.
\code
<Image src="logo.png">
<transform>
- <AxisTranslation axis.startX="0" axis.startY="0" axis.endX="1" axis.endY=".3" distance="10"/>
+ <Translation3D axis.startX="0" axis.startY="0" axis.endX="1" axis.endY=".3" distance="10"/>
</transform>
</Image>
\endcode
*/
-QML_DEFINE_TYPE(QFxTranslation,AxisTranslation);
+QML_DEFINE_TYPE(QFxTranslation3D,Translation3D);
-QFxTranslation::QFxTranslation(QObject *parent)
+QFxTranslation3D::QFxTranslation3D(QObject *parent)
: QFxTransform(parent), _distance(0), _dirty(true)
{
connect(&_axis, SIGNAL(updated()), this, SLOT(update()));
}
-QFxTranslation::~QFxTranslation()
+QFxTranslation3D::~QFxTranslation3D()
{
}
/*!
- \qmlproperty real AxisTranslation::axis.startX
- \qmlproperty real AxisTranslation::axis.startY
- \qmlproperty real AxisTranslation::axis.endX
- \qmlproperty real AxisTranslation::axis.endY
- \qmlproperty real AxisTranslation::axis.endZ
+ \qmlproperty real Translation3D::axis.startX
+ \qmlproperty real Translation3D::axis.startY
+ \qmlproperty real Translation3D::axis.endX
+ \qmlproperty real Translation3D::axis.endY
+ \qmlproperty real Translation3D::axis.endZ
A translation axis is specified by 2 points in 3D space: a start point and
an end point. The z-position of the start point is assumed to be 0, and cannot
be changed. Changing the z-position of the end point is only valid when running
under OpenGL.
*/
-QFxAxis *QFxTranslation::axis()
+QFxAxis *QFxTranslation3D::axis()
{
return &_axis;
}
/*!
- \qmlproperty real AxisTranslation::distance
+ \qmlproperty real Translation3D::distance
The distance to translate along the specified axis. distance is a multiplier;
in the example below, a distance of 1 would translate to 100, 50, while a distance
of 0.5 would translate to 50, 25.
\code
- <AxisTranslation axis.startX="0" axis.startY="0" axis.endX="100" axis.endY="50"/>
+ <Translation3D axis.startX="0" axis.startY="0" axis.endX="100" axis.endY="50"/>
\endcode
*/
-qreal QFxTranslation::distance() const
+qreal QFxTranslation3D::distance() const
{
return _distance;
}
-void QFxTranslation::setDistance(qreal distance)
+void QFxTranslation3D::setDistance(qreal distance)
{
_distance = distance;
update();
}
-bool QFxTranslation::isIdentity() const
+bool QFxTranslation3D::isIdentity() const
{
return (_distance == 0.) || (_axis.endZ() == 0. && _axis.endY() == _axis.startY() && _axis.endX() == _axis.startX());
}
#if defined(QFX_RENDER_QPAINTER)
-QTransform QFxTranslation::transform() const
+QTransform QFxTranslation3D::transform() const
{
if (_dirty) {
_transform = QTransform();
@@ -446,7 +428,7 @@ QTransform QFxTranslation::transform() const
return _transform;
}
#elif defined(QFX_RENDER_OPENGL)
-QMatrix4x4 QFxRotation::transform() const
+QMatrix4x4 QFxTranslation3D::transform() const
{
if (_dirty) {
_dirty = false;
@@ -465,7 +447,7 @@ QMatrix4x4 QFxRotation::transform() const
}
#endif
-void QFxTranslation::update()
+void QFxTranslation3D::update()
{
_dirty = true;
@@ -541,8 +523,62 @@ QMatrix4x4 QFxPerspective::transform() const
\qmlclass Squish
\brief The Squish element allows you to distort an items appearance by 'squishing' it.
- A Squish transform only affects an item when running under OpenGL; when running under software
- rasterization it has no effect.
+ Here is an example of various \l Image squishes.
+ \code
+ Rect {
+ id: Screen
+ width: 360; height: 80
+ color: "white"
+
+ HorizontalLayout {
+ margin: 10
+ spacing: 10
+ Image { src: "qt.png" }
+ Image {
+ src: "qt.png"
+ transform: Squish {
+ x:0; y:0; width:60; height:60
+ topLeftX:0; topLeftY:0
+ topRightX:50; topRightY:10
+ bottomLeftX:0; bottomLeftY:60
+ bottomRightX: 60; bottomRightY:60
+ }
+ }
+ Image {
+ src: "qt.png"
+ transform: Squish {
+ x:0; y:0; width:60; height:60
+ topLeftX:0; topLeftY:0
+ topRightX:50; topRightY:0
+ bottomLeftX:10; bottomLeftY:50
+ bottomRightX: 60; bottomRightY:60
+ }
+ }
+ Image {
+ src: "qt.png"
+ transform: Squish {
+ x:0; y:0; width:60; height:60
+ topLeftX:0; topLeftY:10
+ topRightX:60; topRightY:10
+ bottomLeftX:0; bottomLeftY:50
+ bottomRightX: 60; bottomRightY:50
+ }
+ }
+ Image {
+ src: "qt.png"
+ transform: Squish {
+ x:0; y:0; width:60; height:60
+ topLeftX:10; topLeftY:0
+ topRightX:50; topRightY:0
+ bottomLeftX:10; bottomLeftY:60
+ bottomRightX: 50; bottomRightY:60
+ }
+ }
+ }
+ }
+ \endcode
+
+ \image squish.png
*/
QML_DEFINE_TYPE(QFxSquish,Squish);
@@ -557,6 +593,11 @@ QFxSquish::~QFxSquish()
/*!
\qmlproperty real Squish::x
+ \qmlproperty real Squish::y
+ \qmlproperty real Squish::width
+ \qmlproperty real Squish::height
+
+ This is usually set to the original geometry of the item being squished.
*/
qreal QFxSquish::x() const
{
@@ -569,9 +610,6 @@ void QFxSquish::setX(qreal v)
update();
}
-/*!
- \qmlproperty real Squish::y
-*/
qreal QFxSquish::y() const
{
return p.y();
@@ -583,9 +621,6 @@ void QFxSquish::setY(qreal v)
update();
}
-/*!
- \qmlproperty real Squish::width
-*/
qreal QFxSquish::width() const
{
return s.width();
@@ -597,9 +632,6 @@ void QFxSquish::setWidth(qreal v)
update();
}
-/*!
- \qmlproperty real Squish::height
-*/
qreal QFxSquish::height() const
{
return s.height();
@@ -614,6 +646,8 @@ void QFxSquish::setHeight(qreal v)
/*!
\qmlproperty real Squish::topLeftX
\qmlproperty real Squish::topLeftY
+
+ The top left point for the squish.
*/
qreal QFxSquish::topLeft_x() const
{
@@ -640,6 +674,8 @@ void QFxSquish::settopLeft_y(qreal v)
/*!
\qmlproperty real Squish::topRightX
\qmlproperty real Squish::topRightY
+
+ The top right point for the squish.
*/
qreal QFxSquish::topRight_x() const
{
@@ -666,6 +702,8 @@ void QFxSquish::settopRight_y(qreal v)
/*!
\qmlproperty real Squish::bottomLeftX
\qmlproperty real Squish::bottomLeftY
+
+ The bottom left point for the squish.
*/
qreal QFxSquish::bottomLeft_x() const
{
@@ -692,6 +730,8 @@ void QFxSquish::setbottomLeft_y(qreal v)
/*!
\qmlproperty real Squish::bottomRightX
\qmlproperty real Squish::bottomRightY
+
+ The bottom right point for the squish.
*/
qreal QFxSquish::bottomRight_x() const
{
@@ -722,12 +762,24 @@ void QFxSquish::update()
item->updateTransform();
}
-#if defined(QFX_RENDER_OPENGL)
bool QFxSquish::isIdentity() const
{
return false;
}
+#if defined(QFX_RENDER_QPAINTER)
+QTransform QFxSquish::transform() const
+{
+ QPolygonF poly;
+ poly << p << QPointF(p.x() + s.width(), p.y()) << QPointF(p.x() + s.width(), p.y() + s.height()) << QPointF(p.x(), p.y() + s.height());
+ QPolygonF poly2;
+ poly2 << p1 << p2 << p4 << p3;
+
+ QTransform t;
+ QTransform::quadToQuad(poly, poly2, t);
+ return t;
+}
+#elif defined(QFX_RENDER_OPENGL)
QMatrix4x4 QFxSquish::transform() const
{
QPolygonF poly;
diff --git a/src/declarative/fx/qfxtransform.h b/src/declarative/fx/qfxtransform.h
index 8a4eab1..14bce9b 100644
--- a/src/declarative/fx/qfxtransform.h
+++ b/src/declarative/fx/qfxtransform.h
@@ -109,16 +109,15 @@ private:
};
QML_DECLARE_TYPE(QFxAxis);
-class Q_DECLARATIVE_EXPORT QFxRotation : public QFxTransform
+class Q_DECLARATIVE_EXPORT QFxRotation3D : public QFxTransform
{
Q_OBJECT
Q_PROPERTY(QFxAxis *axis READ axis)
Q_PROPERTY(qreal angle READ angle WRITE setAngle)
- Q_PROPERTY(qreal distanceToPlane READ distanceToPlane WRITE setDistanceToPlane)
public:
- QFxRotation(QObject *parent=0);
- ~QFxRotation();
+ QFxRotation3D(QObject *parent=0);
+ ~QFxRotation3D();
QFxAxis *axis();
@@ -136,22 +135,21 @@ private Q_SLOTS:
private:
QFxAxis _axis;
qreal _angle;
- qreal _distanceToPlane;
mutable bool _dirty;
mutable QSimpleCanvas::Matrix _transform;
};
-QML_DECLARE_TYPE(QFxRotation);
+QML_DECLARE_TYPE(QFxRotation3D);
-class Q_DECLARATIVE_EXPORT QFxTranslation : public QFxTransform
+class Q_DECLARATIVE_EXPORT QFxTranslation3D : public QFxTransform
{
Q_OBJECT
Q_PROPERTY(QFxAxis *axis READ axis)
Q_PROPERTY(qreal distance READ distance WRITE setDistance)
public:
- QFxTranslation(QObject *parent=0);
- ~QFxTranslation();
+ QFxTranslation3D(QObject *parent=0);
+ ~QFxTranslation3D();
QFxAxis *axis();
@@ -170,7 +168,7 @@ private:
mutable bool _dirty;
mutable QSimpleCanvas::Matrix _transform;
};
-QML_DECLARE_TYPE(QFxTranslation);
+QML_DECLARE_TYPE(QFxTranslation3D);
class Q_DECLARATIVE_EXPORT QFxPerspective : public QFxTransform
{
@@ -269,10 +267,8 @@ public:
qreal bottomRight_x() const;
void setbottomRight_x(qreal);
-#if defined(QFX_RENDER_OPENGL)
virtual bool isIdentity() const;
- virtual QMatrix4x4 transform() const;
-#endif
+ virtual QSimpleCanvas::Matrix transform() const;
private:
void update();
diff --git a/src/declarative/fx/qfxwebview.cpp b/src/declarative/fx/qfxwebview.cpp
index 7c05088..fe694ea 100644
--- a/src/declarative/fx/qfxwebview.cpp
+++ b/src/declarative/fx/qfxwebview.cpp
@@ -221,7 +221,13 @@ public:
if the idealHeight is changed after the content is loaded.
\code
- <WebView url="http://www.nokia.com" smooth="true" scale="0.5" width="490" height="400"/>
+ WebView {
+ url: "http://www.nokia.com"
+ width: 490
+ height: 400
+ scale: 0.5
+ smooth: true
+ }
\endcode
\image webview.png
@@ -589,7 +595,8 @@ void QFxWebView::paintGLContents(GLPainter &p)
#if defined(QFX_RENDER_QPAINTER)
bool wasAA = p.testRenderHint(QPainter::Antialiasing);
- p.setRenderHints(QPainter::Antialiasing, d->smooth);
+ bool wasSM = p.testRenderHint(QPainter::SmoothPixmapTransform);
+ p.setRenderHints(QPainter::Antialiasing | QPainter::SmoothPixmapTransform, d->smooth);
QRectF clipf = p.clipRegion().boundingRect();
const QRect clip = p.clipRegion().isEmpty() ? content : clipf.toRect();
#elif defined(QFX_RENDER_OPENGL)
@@ -656,6 +663,7 @@ void QFxWebView::paintGLContents(GLPainter &p)
}
#if defined(QFX_RENDER_QPAINTER)
p.setRenderHints(QPainter::Antialiasing, wasAA);
+ p.setRenderHints(QPainter::SmoothPixmapTransform, wasSM);
#endif
}
@@ -996,23 +1004,12 @@ QString QFxWebView::html() const
\qmlproperty string WebView::html
This property holds HTML text set directly
- The html property can be set as a string (using CDATA for large blocks),
- or as xhtml inline using the XML namespace http://www.w3.org/1999/xhtml:
+ The html property can be set as a string.
\code
- <WebView>
- <html xmlns="http://www.w3.org/1999/xhtml">
- <p>This is valid xHTML.</p>
- </html>
- </WebView>
- \endcode
-
- \code
- <WebView>
- <html>&lt;CDATA[
- <p>This is just HTML.
- ]]&gt;html>
- </WebView>
+ WebView {
+ html: "<p>This is <b>HTML</b>."
+ }
\endcode
*/
void QFxWebView::setHtml(const QString &html, const QUrl &baseUrl)
diff --git a/src/declarative/qml/qml.pri b/src/declarative/qml/qml.pri
index 40b854f..9067039 100644
--- a/src/declarative/qml/qml.pri
+++ b/src/declarative/qml/qml.pri
@@ -32,8 +32,8 @@ HEADERS += qml/qmlparser_p.h \
qml/qmlmetaproperty.h \
qml/qmlcomponent.h \
qml/qmlcomponent_p.h \
- qml/qmlcustomparser.h \
qml/qmlcustomparser_p.h \
+ qml/qmlcustomparser_p_p.h \
qml/qmlpropertyvaluesource.h \
qml/qmlboundsignal_p.h \
qml/qmlxmlparser_p.h \
diff --git a/src/declarative/qml/qmlcompiler.cpp b/src/declarative/qml/qmlcompiler.cpp
index 4433286..c9bdfec 100644
--- a/src/declarative/qml/qmlcompiler.cpp
+++ b/src/declarative/qml/qmlcompiler.cpp
@@ -59,7 +59,7 @@
#include <qmlcontext.h>
#include <qmlmetatype.h>
#include <QtCore/qdebug.h>
-#include "private/qmlcustomparser_p.h"
+#include "private/qmlcustomparser_p_p.h"
#include "qmlscriptparser_p.h"
diff --git a/src/declarative/qml/qmlcompositetypemanager_p.h b/src/declarative/qml/qmlcompositetypemanager_p.h
index ffa4fda..bc86fcf 100644
--- a/src/declarative/qml/qmlcompositetypemanager_p.h
+++ b/src/declarative/qml/qmlcompositetypemanager_p.h
@@ -52,6 +52,7 @@ class QmlEngine;
class QmlCompiledComponent;
class QmlComponentPrivate;
class QmlComponent;
+class QmlDomDocument;
struct QmlCompositeTypeData : public QmlRefCount
{
QmlCompositeTypeData();
@@ -98,6 +99,7 @@ struct QmlCompositeTypeData : public QmlRefCount
private:
friend class QmlCompositeTypeManager;
friend class QmlCompiler;
+ friend class QmlDomDocument;
QmlScriptParser data;
QList<QmlComponentPrivate *> waiters;
diff --git a/src/declarative/qml/qmlcustomparser.cpp b/src/declarative/qml/qmlcustomparser.cpp
index fe0c3a8..544c469 100644
--- a/src/declarative/qml/qmlcustomparser.cpp
+++ b/src/declarative/qml/qmlcustomparser.cpp
@@ -39,8 +39,8 @@
**
****************************************************************************/
-#include "qmlcustomparser.h"
#include "qmlcustomparser_p.h"
+#include "qmlcustomparser_p_p.h"
#include "qmlparser_p.h"
QT_BEGIN_NAMESPACE
@@ -50,6 +50,7 @@ using namespace QmlParser;
/*!
\class QmlCustomParser
\brief The QmlCustomParser class allows you to add new arbitrary types to QML.
+ \internal
By subclassing QmlCustomParser, you can add an XML parser for building a
particular type.
diff --git a/src/declarative/qml/qmlcustomparser.h b/src/declarative/qml/qmlcustomparser.h
deleted file mode 100644
index 0e6a619..0000000
--- a/src/declarative/qml/qmlcustomparser.h
+++ /dev/null
@@ -1,128 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
-**
-** This file is part of the QtDeclarative module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef QMLCUSTOMPARSER_H
-#define QMLCUSTOMPARSER_H
-
-#include <QtCore/qbytearray.h>
-#include <QtCore/qxmlstream.h>
-#include <QtDeclarative/qfxglobal.h>
-#include <QtDeclarative/qmlmetatype.h>
-
-QT_BEGIN_HEADER
-
-QT_BEGIN_NAMESPACE
-
-QT_MODULE(Declarative)
-
-class QmlCustomParserPropertyPrivate;
-class Q_DECLARATIVE_EXPORT QmlCustomParserProperty
-{
-public:
- QmlCustomParserProperty();
- QmlCustomParserProperty(const QmlCustomParserProperty &);
- QmlCustomParserProperty &operator=(const QmlCustomParserProperty &);
- ~QmlCustomParserProperty();
-
- QByteArray name() const;
-
- bool isList() const;
- QList<QVariant> assignedValues() const;
-
-private:
- friend class QmlCustomParserNodePrivate;
- friend class QmlCustomParserPropertyPrivate;
- QmlCustomParserPropertyPrivate *d;
-};
-Q_DECLARE_METATYPE(QmlCustomParserProperty);
-
-class QmlCustomParserNodePrivate;
-class Q_DECLARATIVE_EXPORT QmlCustomParserNode
-{
-public:
- QmlCustomParserNode();
- QmlCustomParserNode(const QmlCustomParserNode &);
- QmlCustomParserNode &operator=(const QmlCustomParserNode &);
- ~QmlCustomParserNode();
-
- QByteArray name() const;
-
- QList<QmlCustomParserProperty> properties() const;
-
-private:
- friend class QmlCustomParserNodePrivate;
- QmlCustomParserNodePrivate *d;
-};
-Q_DECLARE_METATYPE(QmlCustomParserNode);
-
-class Q_DECLARATIVE_EXPORT QmlCustomParser
-{
-public:
- virtual ~QmlCustomParser() {}
-
- virtual QByteArray compile(QXmlStreamReader&, bool *ok)=0;
- virtual QByteArray compile(const QList<QmlCustomParserProperty> &, bool *ok);
- virtual QVariant create(const QByteArray &)=0;
- virtual void setCustomData(QObject *, const QByteArray &);
-
- struct Register {
- Register(const char *name, QmlCustomParser *parser) {
- qmlRegisterCustomParser(name, parser);
- }
- };
- template<typename T>
- struct Define {
- static Register instance;
- };
-};
-#define QML_DEFINE_CUSTOM_PARSER(name, parserClass) \
- template<> QmlCustomParser::Register QmlCustomParser::Define<parserClass>::instance(# name, new parserClass);
-#define QML_DEFINE_CUSTOM_PARSER_NS(namespacestring, name, parserClass) \
- template<> QmlCustomParser::Register QmlCustomParser::Define<parserClass>::instance(namespacestring "/" # name, new parserClass);
-
-#define QML_DEFINE_CUSTOM_TYPE(TYPE, NAME, CUSTOMTYPE) \
- template<> QmlPrivate::InstanceType QmlPrivate::Define<TYPE *>::instance(qmlRegisterCustomType<TYPE>(#NAME, #TYPE, new CUSTOMTYPE));
-
-QT_END_NAMESPACE
-
-QT_END_HEADER
-
-#endif
diff --git a/src/declarative/qml/qmlcustomparser_p.h b/src/declarative/qml/qmlcustomparser_p.h
index 63d148c..0e6a619 100644
--- a/src/declarative/qml/qmlcustomparser_p.h
+++ b/src/declarative/qml/qmlcustomparser_p.h
@@ -39,41 +39,90 @@
**
****************************************************************************/
-#ifndef QMLCUSTOMPARSER_P_H
-#define QMLCUSTOMPARSER_P_H
+#ifndef QMLCUSTOMPARSER_H
+#define QMLCUSTOMPARSER_H
-#include <QtCore/qglobal.h>
-#include "qmlcustomparser.h"
+#include <QtCore/qbytearray.h>
+#include <QtCore/qxmlstream.h>
+#include <QtDeclarative/qfxglobal.h>
+#include <QtDeclarative/qmlmetatype.h>
+
+QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
-namespace QmlParser
+QT_MODULE(Declarative)
+
+class QmlCustomParserPropertyPrivate;
+class Q_DECLARATIVE_EXPORT QmlCustomParserProperty
{
- class Object;
- class Property;
+public:
+ QmlCustomParserProperty();
+ QmlCustomParserProperty(const QmlCustomParserProperty &);
+ QmlCustomParserProperty &operator=(const QmlCustomParserProperty &);
+ ~QmlCustomParserProperty();
+
+ QByteArray name() const;
+
+ bool isList() const;
+ QList<QVariant> assignedValues() const;
+
+private:
+ friend class QmlCustomParserNodePrivate;
+ friend class QmlCustomParserPropertyPrivate;
+ QmlCustomParserPropertyPrivate *d;
};
+Q_DECLARE_METATYPE(QmlCustomParserProperty);
-class QmlCustomParserNodePrivate
+class QmlCustomParserNodePrivate;
+class Q_DECLARATIVE_EXPORT QmlCustomParserNode
{
public:
- QByteArray name;
- QList<QmlCustomParserProperty> properties;
+ QmlCustomParserNode();
+ QmlCustomParserNode(const QmlCustomParserNode &);
+ QmlCustomParserNode &operator=(const QmlCustomParserNode &);
+ ~QmlCustomParserNode();
- static QmlCustomParserNode fromObject(QmlParser::Object *);
- static QmlCustomParserProperty fromProperty(QmlParser::Property *);
+ QByteArray name() const;
+
+ QList<QmlCustomParserProperty> properties() const;
+
+private:
+ friend class QmlCustomParserNodePrivate;
+ QmlCustomParserNodePrivate *d;
};
+Q_DECLARE_METATYPE(QmlCustomParserNode);
-class QmlCustomParserPropertyPrivate
+class Q_DECLARATIVE_EXPORT QmlCustomParser
{
public:
- QmlCustomParserPropertyPrivate()
- : isList(false) {}
+ virtual ~QmlCustomParser() {}
+
+ virtual QByteArray compile(QXmlStreamReader&, bool *ok)=0;
+ virtual QByteArray compile(const QList<QmlCustomParserProperty> &, bool *ok);
+ virtual QVariant create(const QByteArray &)=0;
+ virtual void setCustomData(QObject *, const QByteArray &);
- QByteArray name;
- bool isList;
- QList<QVariant> values;
+ struct Register {
+ Register(const char *name, QmlCustomParser *parser) {
+ qmlRegisterCustomParser(name, parser);
+ }
+ };
+ template<typename T>
+ struct Define {
+ static Register instance;
+ };
};
+#define QML_DEFINE_CUSTOM_PARSER(name, parserClass) \
+ template<> QmlCustomParser::Register QmlCustomParser::Define<parserClass>::instance(# name, new parserClass);
+#define QML_DEFINE_CUSTOM_PARSER_NS(namespacestring, name, parserClass) \
+ template<> QmlCustomParser::Register QmlCustomParser::Define<parserClass>::instance(namespacestring "/" # name, new parserClass);
+
+#define QML_DEFINE_CUSTOM_TYPE(TYPE, NAME, CUSTOMTYPE) \
+ template<> QmlPrivate::InstanceType QmlPrivate::Define<TYPE *>::instance(qmlRegisterCustomType<TYPE>(#NAME, #TYPE, new CUSTOMTYPE));
QT_END_NAMESPACE
-#endif // QMLCUSTOMPARSER_P_H
+QT_END_HEADER
+
+#endif
diff --git a/src/declarative/qml/qmlcustomparser_p_p.h b/src/declarative/qml/qmlcustomparser_p_p.h
new file mode 100644
index 0000000..96e9b32
--- /dev/null
+++ b/src/declarative/qml/qmlcustomparser_p_p.h
@@ -0,0 +1,79 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the QtDeclarative module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QMLCUSTOMPARSER_P_H
+#define QMLCUSTOMPARSER_P_H
+
+#include <QtCore/qglobal.h>
+#include "qmlcustomparser_p.h"
+
+QT_BEGIN_NAMESPACE
+
+namespace QmlParser
+{
+ class Object;
+ class Property;
+};
+
+class QmlCustomParserNodePrivate
+{
+public:
+ QByteArray name;
+ QList<QmlCustomParserProperty> properties;
+
+ static QmlCustomParserNode fromObject(QmlParser::Object *);
+ static QmlCustomParserProperty fromProperty(QmlParser::Property *);
+};
+
+class QmlCustomParserPropertyPrivate
+{
+public:
+ QmlCustomParserPropertyPrivate()
+ : isList(false) {}
+
+ QByteArray name;
+ bool isList;
+ QList<QVariant> values;
+};
+
+QT_END_NAMESPACE
+
+#endif // QMLCUSTOMPARSER_P_H
diff --git a/src/declarative/qml/qmldom.cpp b/src/declarative/qml/qmldom.cpp
index 72c1c76..4e8e1f7 100644
--- a/src/declarative/qml/qmldom.cpp
+++ b/src/declarative/qml/qmldom.cpp
@@ -42,6 +42,7 @@
#include "qmldom.h"
#include "qmldom_p.h"
#include "private/qmlcompiler_p.h"
+#include "private/qmlengine_p.h"
#include "qmlcompiledcomponent_p.h"
#include <QtCore/qbytearray.h>
#include <QtCore/qstring.h>
@@ -159,15 +160,28 @@ bool QmlDomDocument::load(QmlEngine *engine, const QByteArray &data)
QmlCompiledComponent component;
QmlCompiler compiler;
- // ###
-// compiler.compile(engine, parser, &component);
+
+ QmlCompositeTypeData *td = ((QmlEnginePrivate *)QmlEnginePrivate::get(engine))->typeManager.getImmediate(data, QUrl());;
+
+ if(td->status == QmlCompositeTypeData::Error) {
+ d->error = td->errorDescription;
+ td->release();
+ return false;
+ } else if(td->status == QmlCompositeTypeData::Waiting) {
+ d->error = QLatin1String("QmlDomDocument supports local types only");
+ td->release();
+ return false;
+ }
+
+ compiler.compile(engine, td, &component);
if (compiler.isError()) {
d->error = compiler.errorDescription();
+ td->release();
return false;
}
- if (parser.tree()) {
+ if (td->data.tree()) {
component.dump(0, parser.tree());
d->root = parser.tree();
d->root->addref();
diff --git a/src/declarative/qml/qmlmetatype.cpp b/src/declarative/qml/qmlmetatype.cpp
index fbfeca0..63e5c58 100644
--- a/src/declarative/qml/qmlmetatype.cpp
+++ b/src/declarative/qml/qmlmetatype.cpp
@@ -57,7 +57,7 @@
#include <qvector.h>
#include <qlocale.h>
#include <QtCore/qcryptographichash.h>
-#include <qmlcustomparser.h>
+#include <private/qmlcustomparser_p.h>
QT_BEGIN_NAMESPACE
#ifdef QT_BOOTSTRAPPED
diff --git a/src/declarative/qml/qmlvme.cpp b/src/declarative/qml/qmlvme.cpp
index 7b3291e..e6235e4 100644
--- a/src/declarative/qml/qmlvme.cpp
+++ b/src/declarative/qml/qmlvme.cpp
@@ -45,7 +45,7 @@
#include <private/qmlstringconverters_p.h>
#include "private/qmetaobjectbuilder_p.h"
#include <qml.h>
-#include <qmlcustomparser.h>
+#include <private/qmlcustomparser_p.h>
#include <qperformancelog.h>
#include <QStack>
#include <private/qmlcompiledcomponent_p.h>
diff --git a/src/declarative/qml/qmlxmlparser.cpp b/src/declarative/qml/qmlxmlparser.cpp
index b3565a0..35d2c0e 100644
--- a/src/declarative/qml/qmlxmlparser.cpp
+++ b/src/declarative/qml/qmlxmlparser.cpp
@@ -40,7 +40,7 @@
****************************************************************************/
#include "qmlxmlparser_p.h"
-#include "qmlcustomparser.h"
+#include "qmlcustomparser_p.h"
#include <qfxperf.h>
#include <QXmlStreamReader>
#include <QStack>
diff --git a/src/declarative/util/qfxview.cpp b/src/declarative/util/qfxview.cpp
index 42047b6..5611bca 100644
--- a/src/declarative/util/qfxview.cpp
+++ b/src/declarative/util/qfxview.cpp
@@ -265,7 +265,7 @@ void QFxView::continueExecute()
d->root = item;
connect(item, SIGNAL(widthChanged()), this, SLOT(sizeChanged()));
connect(item, SIGNAL(heightChanged()), this, SLOT(sizeChanged()));
- sizeChanged();
+ emit sceneResized(QSize(d->root->width(),d->root->height()));
} else if (QWidget *wid = qobject_cast<QWidget *>(obj)) {
window()->setAttribute(Qt::WA_OpaquePaintEvent, false);
window()->setAttribute(Qt::WA_NoSystemBackground, false);
diff --git a/src/declarative/util/qmllistmodel.cpp b/src/declarative/util/qmllistmodel.cpp
index 968e17b..4837180 100644
--- a/src/declarative/util/qmllistmodel.cpp
+++ b/src/declarative/util/qmllistmodel.cpp
@@ -42,7 +42,7 @@
#include <QtCore/qdebug.h>
#include <QtCore/qstack.h>
#include <QXmlStreamReader>
-#include "qmlcustomparser.h"
+#include <private/qmlcustomparser_p.h>
#include "qmlopenmetaobject.h"
#include <qmlcontext.h>
#include <qmlbindablevalue.h>