summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/declarative/graphicsitems/qdeclarativeflickable.cpp8
-rw-r--r--src/declarative/graphicsitems/qdeclarativeitem.cpp6
-rw-r--r--src/declarative/graphicsitems/qdeclarativepath.cpp120
-rw-r--r--src/declarative/qml/parser/qdeclarativejsast_p.h149
-rw-r--r--tests/auto/declarative/qdeclarativeitem/data/transformCrash.qml13
-rw-r--r--tests/auto/declarative/qdeclarativeitem/tst_qdeclarativeitem.cpp12
6 files changed, 132 insertions, 176 deletions
diff --git a/src/declarative/graphicsitems/qdeclarativeflickable.cpp b/src/declarative/graphicsitems/qdeclarativeflickable.cpp
index 84b0ccf..f9c16b3 100644
--- a/src/declarative/graphicsitems/qdeclarativeflickable.cpp
+++ b/src/declarative/graphicsitems/qdeclarativeflickable.cpp
@@ -456,8 +456,8 @@ QDeclarativeFlickable::~QDeclarativeFlickable()
}
/*!
- \qmlproperty int Flickable::contentX
- \qmlproperty int Flickable::contentY
+ \qmlproperty real Flickable::contentX
+ \qmlproperty real Flickable::contentY
These properties hold the surface coordinate currently at the top-left
corner of the Flickable. For example, if you flick an image up 100 pixels,
@@ -1154,8 +1154,8 @@ void QDeclarativeFlickable::setBoundsBehavior(BoundsBehavior b)
}
/*!
- \qmlproperty int Flickable::contentWidth
- \qmlproperty int Flickable::contentHeight
+ \qmlproperty real Flickable::contentWidth
+ \qmlproperty real Flickable::contentHeight
The dimensions of the content (the surface controlled by Flickable). Typically this
should be set to the combined size of the items placed in the Flickable. Note this
diff --git a/src/declarative/graphicsitems/qdeclarativeitem.cpp b/src/declarative/graphicsitems/qdeclarativeitem.cpp
index f26b602..484c168 100644
--- a/src/declarative/graphicsitems/qdeclarativeitem.cpp
+++ b/src/declarative/graphicsitems/qdeclarativeitem.cpp
@@ -1705,7 +1705,7 @@ int QDeclarativeItemPrivate::transform_count(QDeclarativeListProperty<QGraphicsT
void QDeclarativeItemPrivate::transform_append(QDeclarativeListProperty<QGraphicsTransform> *list, QGraphicsTransform *item)
{
QGraphicsObject *object = qobject_cast<QGraphicsObject *>(list->object);
- if (object) // QGraphicsItem applies the list in the wrong order, so we prepend.
+ if (object && item) // QGraphicsItem applies the list in the wrong order, so we prepend.
QGraphicsItemPrivate::get(object)->prependGraphicsTransform(item);
}
@@ -1745,8 +1745,8 @@ void QDeclarativeItemPrivate::parentProperty(QObject *o, void *rv, QDeclarativeN
\qmlproperty list<Object> Item::data
\default
- The data property is allows you to freely mix visual children and resources
- of an item. If you assign a visual item to the data list it becomes
+ The data property allows you to freely mix visual children and resources
+ in an item. If you assign a visual item to the data list it becomes
a child and if you assign any other object type, it is added as a resource.
So you can write:
diff --git a/src/declarative/graphicsitems/qdeclarativepath.cpp b/src/declarative/graphicsitems/qdeclarativepath.cpp
index f93357d..d526688 100644
--- a/src/declarative/graphicsitems/qdeclarativepath.cpp
+++ b/src/declarative/graphicsitems/qdeclarativepath.cpp
@@ -491,17 +491,17 @@ void QDeclarativeCurve::setY(qreal y)
\since 4.7
\brief The PathAttribute allows setting an attribute at a given position in a Path.
- The PathAttribute object allows attibutes consisting of a name and
- a value to be specified for the endpoints of path segments. The
+ The PathAttribute object allows attributes consisting of a name and
+ a value to be specified for various points along a path. The
attributes are exposed to the delegate as
\l{qdeclarativeintroduction.html#attached-properties} {Attached Properties}.
- The value of an attribute at any particular point is interpolated
- from the PathAttributes bounding the point.
+ The value of an attribute at any particular point along the path is interpolated
+ from the PathAttributes bounding that point.
The example below shows a path with the items scaled to 30% with
opacity 50% at the top of the path and scaled 100% with opacity
- 100% at the bottom. Note the use of the PathView.scale and
- PathView.opacity attached properties to set the scale and opacity
+ 100% at the bottom. Note the use of the PathView.iconScale and
+ PathView.iconOpacity attached properties to set the scale and opacity
of the delegate.
\table
@@ -509,14 +509,17 @@ void QDeclarativeCurve::setY(qreal y)
\o \image declarative-pathattribute.png
\o
\snippet doc/src/snippets/declarative/pathview/pathattributes.qml 0
+ (see the PathView documentation for the specification of ContactModel.qml
+ used for ContactModel above.)
\endtable
- \sa Path
+
+ \sa Path
*/
/*!
\qmlproperty string PathAttribute::name
- the name of the attribute to change.
+ This property holds the name of the attribute to change.
This attribute will be available to the delegate as PathView.<name>
@@ -544,8 +547,39 @@ void QDeclarativePathAttribute::setName(const QString &name)
}
/*!
- \qmlproperty string PathAttribute::value
- the new value of the attribute.
+ \qmlproperty real PathAttribute::value
+ This property holds the value for the attribute.
+
+ The value specified can be used to influence the visual appearance
+ of an item along the path. For example, the following Path specifies
+ an attribute named \e itemRotation, which has the value \e 0 at the
+ beginning of the path, and the value 90 at the end of the path.
+
+ \qml
+ Path {
+ startX: 0
+ startY: 0
+ PathAttribute { name: "itemRotation"; value: 0 }
+ PathLine { x: 100; y: 100 }
+ PathAttribute { name: "itemRotation"; value: 90 }
+ }
+ \endqml
+
+ In our delegate, we can then bind the \e rotation property to the
+ \l{qdeclarativeintroduction.html#attached-properties} {Attached Property}
+ \e PathView.itemRotation created for this attribute.
+
+ \qml
+ Rectangle {
+ width: 10; height: 10
+ rotation: PathView.itemRotation
+ }
+ \endqml
+
+ As each item is positioned along the path, it will be rotated accordingly:
+ an item at the beginning of the path with be not be rotated, an item at
+ the end of the path will be rotated 90 degrees, and an item mid-way along
+ the path will be rotated 45 degrees.
*/
/*!
@@ -792,6 +826,10 @@ void QDeclarativePathCubic::addToPath(QPainterPath &path)
\since 4.7
\brief The PathPercent manipulates the way a path is interpreted.
+ PathPercent allows you to manipulate the spacing between items on a
+ PathView's path. You can use it to bunch together items on part of
+ the path, and spread them out on other parts of the path.
+
The examples below show the normal distrubution of items along a path
compared to a distribution which places 50% of the items along the
PathLine section of the path.
@@ -800,25 +838,31 @@ void QDeclarativePathCubic::addToPath(QPainterPath &path)
\o \image declarative-nopercent.png
\o
\qml
- Path {
- startX: 20; startY: 0
- PathQuad { x: 50; y: 80; controlX: 0; controlY: 80 }
- PathLine { x: 150; y: 80 }
- PathQuad { x: 180; y: 0; controlX: 200; controlY: 80 }
+ PathView {
+ ...
+ Path {
+ startX: 20; startY: 0
+ PathQuad { x: 50; y: 80; controlX: 0; controlY: 80 }
+ PathLine { x: 150; y: 80 }
+ PathQuad { x: 180; y: 0; controlX: 200; controlY: 80 }
+ }
}
\endqml
\row
\o \image declarative-percent.png
\o
\qml
- Path {
- startX: 20; startY: 0
- PathQuad { x: 50; y: 80; controlX: 0; controlY: 80 }
- PathPercent { value: 0.25 }
- PathLine { x: 150; y: 80 }
- PathPercent { value: 0.75 }
- PathQuad { x: 180; y: 0; controlX: 200; controlY: 80 }
- PathPercent { value: 1 }
+ PathView {
+ ...
+ Path {
+ startX: 20; startY: 0
+ PathQuad { x: 50; y: 80; controlX: 0; controlY: 80 }
+ PathPercent { value: 0.25 }
+ PathLine { x: 150; y: 80 }
+ PathPercent { value: 0.75 }
+ PathQuad { x: 180; y: 0; controlX: 200; controlY: 80 }
+ PathPercent { value: 1 }
+ }
}
\endqml
\endtable
@@ -826,6 +870,36 @@ void QDeclarativePathCubic::addToPath(QPainterPath &path)
\sa Path
*/
+/*!
+ \qmlproperty real value
+ The proporation of items that should be laid out up to this point.
+
+ This value should always be higher than the last value specified
+ by a PathPercent at a previous position in the Path.
+
+ In the following example we have a Path made up of three PathLines.
+ Normally, the items of the PathView would be laid out equally along
+ this path, with an equal number of items per line segment. PathPercent
+ allows us to specify that the first and third lines should each hold
+ 10% of the laid out items, while the second line should hold the remaining
+ 80%.
+
+ \qml
+ PathView {
+ ...
+ Path {
+ startX: 0; startY: 0
+ PathLine { x:100; y: 0; }
+ PathPercent { value: 0.1 }
+ PathLine { x: 100; y: 100 }
+ PathPercent { value: 0.9 }
+ PathLine { x: 100; y: 0 }
+ PathPercent { value: 1 }
+ }
+ }
+ \endqml
+*/
+
qreal QDeclarativePathPercent::value() const
{
return _value;
diff --git a/src/declarative/qml/parser/qdeclarativejsast_p.h b/src/declarative/qml/parser/qdeclarativejsast_p.h
index 0623a2a..541ea7f 100644
--- a/src/declarative/qml/parser/qdeclarativejsast_p.h
+++ b/src/declarative/qml/parser/qdeclarativejsast_p.h
@@ -224,6 +224,9 @@ public:
inline Node()
: kind(Kind_Undefined) {}
+ // NOTE: node destructors are never called,
+ // instead we block free the memory
+ // (see the NodePool class)
virtual ~Node() {}
virtual ExpressionNode *expressionCast();
@@ -247,7 +250,6 @@ class QML_PARSER_EXPORT ExpressionNode: public Node
{
public:
ExpressionNode() {}
- virtual ~ExpressionNode() {}
virtual ExpressionNode *expressionCast();
@@ -259,7 +261,6 @@ class QML_PARSER_EXPORT Statement: public Node
{
public:
Statement() {}
- virtual ~Statement() {}
virtual Statement *statementCast();
@@ -379,7 +380,6 @@ public:
QDECLARATIVEJS_DECLARE_AST_NODE(ThisExpression)
ThisExpression() { kind = K; }
- virtual ~ThisExpression() {}
virtual void accept0(Visitor *visitor);
@@ -401,8 +401,6 @@ public:
IdentifierExpression(NameId *n):
name (n) { kind = K; }
- virtual ~IdentifierExpression() {}
-
virtual void accept0(Visitor *visitor);
virtual SourceLocation firstSourceLocation() const
@@ -422,7 +420,6 @@ public:
QDECLARATIVEJS_DECLARE_AST_NODE(NullExpression)
NullExpression() { kind = K; }
- virtual ~NullExpression() {}
virtual void accept0(Visitor *visitor);
@@ -442,7 +439,6 @@ public:
QDECLARATIVEJS_DECLARE_AST_NODE(TrueLiteral)
TrueLiteral() { kind = K; }
- virtual ~TrueLiteral() {}
virtual void accept0(Visitor *visitor);
@@ -462,7 +458,6 @@ public:
QDECLARATIVEJS_DECLARE_AST_NODE(FalseLiteral)
FalseLiteral() { kind = K; }
- virtual ~FalseLiteral() {}
virtual void accept0(Visitor *visitor);
@@ -483,7 +478,6 @@ public:
NumericLiteral(double v):
value(v) { kind = K; }
- virtual ~NumericLiteral() {}
virtual void accept0(Visitor *visitor);
@@ -506,8 +500,6 @@ public:
StringLiteral(NameId *v):
value (v) { kind = K; }
- virtual ~StringLiteral() {}
-
virtual void accept0(Visitor *visitor);
virtual SourceLocation firstSourceLocation() const
@@ -529,8 +521,6 @@ public:
RegExpLiteral(NameId *p, int f):
pattern (p), flags (f) { kind = K; }
- virtual ~RegExpLiteral() {}
-
virtual void accept0(Visitor *visitor);
virtual SourceLocation firstSourceLocation() const
@@ -562,8 +552,6 @@ public:
elements (elts), elision (e)
{ kind = K; }
- virtual ~ArrayLiteral() {}
-
virtual void accept0(Visitor *visitor);
virtual SourceLocation firstSourceLocation() const
@@ -591,8 +579,6 @@ public:
ObjectLiteral(PropertyNameAndValueList *plist):
properties (plist) { kind = K; }
- virtual ~ObjectLiteral() {}
-
virtual void accept0(Visitor *visitor);
virtual SourceLocation firstSourceLocation() const
@@ -624,8 +610,6 @@ public:
previous->next = this;
}
- virtual ~ElementList() {}
-
inline ElementList *finish ()
{
ElementList *front = next;
@@ -657,8 +641,6 @@ public:
previous->next = this;
}
- virtual ~Elision() {}
-
virtual void accept0(Visitor *visitor);
inline Elision *finish ()
@@ -690,8 +672,6 @@ public:
previous->next = this;
}
- virtual ~PropertyNameAndValueList() {}
-
virtual void accept0(Visitor *visitor);
inline PropertyNameAndValueList *finish ()
@@ -715,7 +695,6 @@ public:
QDECLARATIVEJS_DECLARE_AST_NODE(PropertyName)
PropertyName() { kind = K; }
- virtual ~PropertyName() {}
// attributes
SourceLocation propertyNameToken;
@@ -729,8 +708,6 @@ public:
IdentifierPropertyName(NameId *n):
id (n) { kind = K; }
- virtual ~IdentifierPropertyName() {}
-
virtual void accept0(Visitor *visitor);
// attributes
@@ -744,7 +721,6 @@ public:
StringLiteralPropertyName(NameId *n):
id (n) { kind = K; }
- virtual ~StringLiteralPropertyName() {}
virtual void accept0(Visitor *visitor);
@@ -759,7 +735,6 @@ public:
NumericLiteralPropertyName(double n):
id (n) { kind = K; }
- virtual ~NumericLiteralPropertyName() {}
virtual void accept0(Visitor *visitor);
@@ -776,8 +751,6 @@ public:
base (b), expression (e)
{ kind = K; }
- virtual ~ArrayMemberExpression() {}
-
virtual void accept0(Visitor *visitor);
virtual SourceLocation firstSourceLocation() const
@@ -802,8 +775,6 @@ public:
base (b), name (n)
{ kind = K; }
- virtual ~FieldMemberExpression() {}
-
virtual void accept0(Visitor *visitor);
virtual SourceLocation firstSourceLocation() const
@@ -828,8 +799,6 @@ public:
base (b), arguments (a)
{ kind = K; }
- virtual ~NewMemberExpression() {}
-
virtual void accept0(Visitor *visitor);
virtual SourceLocation firstSourceLocation() const
@@ -854,8 +823,6 @@ public:
NewExpression(ExpressionNode *e):
expression (e) { kind = K; }
- virtual ~NewExpression() {}
-
virtual void accept0(Visitor *visitor);
virtual SourceLocation firstSourceLocation() const
@@ -878,8 +845,6 @@ public:
base (b), arguments (a)
{ kind = K; }
- virtual ~CallExpression() {}
-
virtual void accept0(Visitor *visitor);
virtual SourceLocation firstSourceLocation() const
@@ -912,8 +877,6 @@ public:
previous->next = this;
}
- virtual ~ArgumentList() {}
-
virtual void accept0(Visitor *visitor);
inline ArgumentList *finish ()
@@ -937,8 +900,6 @@ public:
PostIncrementExpression(ExpressionNode *b):
base (b) { kind = K; }
- virtual ~PostIncrementExpression() {}
-
virtual void accept0(Visitor *visitor);
virtual SourceLocation firstSourceLocation() const
@@ -960,8 +921,6 @@ public:
PostDecrementExpression(ExpressionNode *b):
base (b) { kind = K; }
- virtual ~PostDecrementExpression() {}
-
virtual void accept0(Visitor *visitor);
virtual SourceLocation firstSourceLocation() const
@@ -982,7 +941,6 @@ public:
DeleteExpression(ExpressionNode *e):
expression (e) { kind = K; }
- virtual ~DeleteExpression() {}
virtual void accept0(Visitor *visitor);
@@ -1005,8 +963,6 @@ public:
VoidExpression(ExpressionNode *e):
expression (e) { kind = K; }
- virtual ~VoidExpression() {}
-
virtual void accept0(Visitor *visitor);
virtual SourceLocation firstSourceLocation() const
@@ -1028,8 +984,6 @@ public:
TypeOfExpression(ExpressionNode *e):
expression (e) { kind = K; }
- virtual ~TypeOfExpression() {}
-
virtual void accept0(Visitor *visitor);
virtual SourceLocation firstSourceLocation() const
@@ -1051,8 +1005,6 @@ public:
PreIncrementExpression(ExpressionNode *e):
expression (e) { kind = K; }
- virtual ~PreIncrementExpression() {}
-
virtual void accept0(Visitor *visitor);
virtual SourceLocation firstSourceLocation() const
@@ -1074,8 +1026,6 @@ public:
PreDecrementExpression(ExpressionNode *e):
expression (e) { kind = K; }
- virtual ~PreDecrementExpression() {}
-
virtual void accept0(Visitor *visitor);
virtual SourceLocation firstSourceLocation() const
@@ -1097,8 +1047,6 @@ public:
UnaryPlusExpression(ExpressionNode *e):
expression (e) { kind = K; }
- virtual ~UnaryPlusExpression() {}
-
virtual void accept0(Visitor *visitor);
virtual SourceLocation firstSourceLocation() const
@@ -1120,8 +1068,6 @@ public:
UnaryMinusExpression(ExpressionNode *e):
expression (e) { kind = K; }
- virtual ~UnaryMinusExpression() {}
-
virtual void accept0(Visitor *visitor);
virtual SourceLocation firstSourceLocation() const
@@ -1143,8 +1089,6 @@ public:
TildeExpression(ExpressionNode *e):
expression (e) { kind = K; }
- virtual ~TildeExpression() {}
-
virtual void accept0(Visitor *visitor);
virtual SourceLocation firstSourceLocation() const
@@ -1166,8 +1110,6 @@ public:
NotExpression(ExpressionNode *e):
expression (e) { kind = K; }
- virtual ~NotExpression() {}
-
virtual void accept0(Visitor *visitor);
virtual SourceLocation firstSourceLocation() const
@@ -1190,8 +1132,6 @@ public:
left (l), op (o), right (r)
{ kind = K; }
- virtual ~BinaryExpression() {}
-
virtual BinaryExpression *binaryExpressionCast();
virtual void accept0(Visitor *visitor);
@@ -1218,8 +1158,6 @@ public:
expression (e), ok (t), ko (f)
{ kind = K; }
- virtual ~ConditionalExpression() {}
-
virtual void accept0(Visitor *visitor);
virtual SourceLocation firstSourceLocation() const
@@ -1244,8 +1182,6 @@ public:
Expression(ExpressionNode *l, ExpressionNode *r):
left (l), right (r) { kind = K; }
- virtual ~Expression() {}
-
virtual void accept0(Visitor *visitor);
virtual SourceLocation firstSourceLocation() const
@@ -1268,8 +1204,6 @@ public:
Block(StatementList *slist):
statements (slist) { kind = K; }
- virtual ~Block() {}
-
virtual void accept0(Visitor *visitor);
virtual SourceLocation firstSourceLocation() const
@@ -1301,8 +1235,6 @@ public:
previous->next = this;
}
- virtual ~StatementList() {}
-
virtual void accept0(Visitor *visitor);
inline StatementList *finish ()
@@ -1326,8 +1258,6 @@ public:
declarations (vlist)
{ kind = K; }
- virtual ~VariableStatement() {}
-
virtual void accept0(Visitor *visitor);
virtual SourceLocation firstSourceLocation() const
@@ -1351,8 +1281,6 @@ public:
name (n), expression (e), readOnly(false)
{ kind = K; }
- virtual ~VariableDeclaration() {}
-
virtual void accept0(Visitor *visitor);
// attributes
@@ -1379,8 +1307,6 @@ public:
previous->next = this;
}
- virtual ~VariableDeclarationList() {}
-
virtual void accept0(Visitor *visitor);
inline VariableDeclarationList *finish (bool readOnly)
@@ -1407,7 +1333,6 @@ public:
QDECLARATIVEJS_DECLARE_AST_NODE(EmptyStatement)
EmptyStatement() { kind = K; }
- virtual ~EmptyStatement() {}
virtual void accept0(Visitor *visitor);
@@ -1429,8 +1354,6 @@ public:
ExpressionStatement(ExpressionNode *e):
expression (e) { kind = K; }
- virtual ~ExpressionStatement() {}
-
virtual void accept0(Visitor *visitor);
virtual SourceLocation firstSourceLocation() const
@@ -1453,8 +1376,6 @@ public:
expression (e), ok (t), ko (f)
{ kind = K; }
- virtual ~IfStatement() {}
-
virtual void accept0(Visitor *visitor);
virtual SourceLocation firstSourceLocation() const
@@ -1487,8 +1408,6 @@ public:
statement (stmt), expression (e)
{ kind = K; }
- virtual ~DoWhileStatement() {}
-
virtual void accept0(Visitor *visitor);
virtual SourceLocation firstSourceLocation() const
@@ -1516,8 +1435,6 @@ public:
expression (e), statement (stmt)
{ kind = K; }
- virtual ~WhileStatement() {}
-
virtual void accept0(Visitor *visitor);
virtual SourceLocation firstSourceLocation() const
@@ -1543,8 +1460,6 @@ public:
initialiser (i), condition (c), expression (e), statement (stmt)
{ kind = K; }
- virtual ~ForStatement() {}
-
virtual void accept0(Visitor *visitor);
virtual SourceLocation firstSourceLocation() const
@@ -1574,8 +1489,6 @@ public:
declarations (vlist), condition (c), expression (e), statement (stmt)
{ kind = K; }
- virtual ~LocalForStatement() {}
-
virtual void accept0(Visitor *visitor);
virtual SourceLocation firstSourceLocation() const
@@ -1606,8 +1519,6 @@ public:
initialiser (i), expression (e), statement (stmt)
{ kind = K; }
- virtual ~ForEachStatement() {}
-
virtual void accept0(Visitor *visitor);
virtual SourceLocation firstSourceLocation() const
@@ -1635,8 +1546,6 @@ public:
declaration (v), expression (e), statement (stmt)
{ kind = K; }
- virtual ~LocalForEachStatement() {}
-
virtual void accept0(Visitor *visitor);
virtual SourceLocation firstSourceLocation() const
@@ -1664,8 +1573,6 @@ public:
ContinueStatement(NameId *l = 0):
label (l) { kind = K; }
- virtual ~ContinueStatement() {}
-
virtual void accept0(Visitor *visitor);
virtual SourceLocation firstSourceLocation() const
@@ -1689,8 +1596,6 @@ public:
BreakStatement(NameId *l = 0):
label (l) { kind = K; }
- virtual ~BreakStatement() {}
-
virtual void accept0(Visitor *visitor);
virtual SourceLocation firstSourceLocation() const
@@ -1714,8 +1619,6 @@ public:
ReturnStatement(ExpressionNode *e):
expression (e) { kind = K; }
- virtual ~ReturnStatement() {}
-
virtual void accept0(Visitor *visitor);
virtual SourceLocation firstSourceLocation() const
@@ -1739,8 +1642,6 @@ public:
expression (e), statement (stmt)
{ kind = K; }
- virtual ~WithStatement() {}
-
virtual void accept0(Visitor *visitor);
virtual SourceLocation firstSourceLocation() const
@@ -1766,8 +1667,6 @@ public:
clauses (c), defaultClause (d), moreClauses (r)
{ kind = K; }
- virtual ~CaseBlock() {}
-
virtual void accept0(Visitor *visitor);
// attributes
@@ -1787,8 +1686,6 @@ public:
expression (e), block (b)
{ kind = K; }
- virtual ~SwitchStatement() {}
-
virtual void accept0(Visitor *visitor);
virtual SourceLocation firstSourceLocation() const
@@ -1822,8 +1719,6 @@ public:
previous->next = this;
}
- virtual ~CaseClauses() {}
-
virtual void accept0(Visitor *visitor);
inline CaseClauses *finish ()
@@ -1847,8 +1742,6 @@ public:
expression (e), statements (slist)
{ kind = K; }
- virtual ~CaseClause() {}
-
virtual void accept0(Visitor *visitor);
// attributes
@@ -1867,8 +1760,6 @@ public:
statements (slist)
{ kind = K; }
- virtual ~DefaultClause() {}
-
virtual void accept0(Visitor *visitor);
// attributes
@@ -1886,8 +1777,6 @@ public:
label (l), statement (stmt)
{ kind = K; }
- virtual ~LabelledStatement() {}
-
virtual void accept0(Visitor *visitor);
virtual SourceLocation firstSourceLocation() const
@@ -1911,8 +1800,6 @@ public:
ThrowStatement(ExpressionNode *e):
expression (e) { kind = K; }
- virtual ~ThrowStatement() {}
-
virtual void accept0(Visitor *visitor);
virtual SourceLocation firstSourceLocation() const
@@ -1936,8 +1823,6 @@ public:
name (n), statement (stmt)
{ kind = K; }
- virtual ~Catch() {}
-
virtual void accept0(Visitor *visitor);
// attributes
@@ -1958,8 +1843,6 @@ public:
statement (stmt)
{ kind = K; }
- virtual ~Finally() {}
-
virtual void accept0(Visitor *visitor);
// attributes
@@ -1984,8 +1867,6 @@ public:
statement (stmt), catchExpression (c), finallyExpression (0)
{ kind = K; }
- virtual ~TryStatement() {}
-
virtual void accept0(Visitor *visitor);
virtual SourceLocation firstSourceLocation() const
@@ -2017,8 +1898,6 @@ public:
name (n), formals (f), body (b)
{ kind = K; }
- virtual ~FunctionExpression() {}
-
virtual void accept0(Visitor *visitor);
virtual SourceLocation firstSourceLocation() const
@@ -2048,8 +1927,6 @@ public:
FunctionExpression(n, f, b)
{ kind = K; }
- virtual ~FunctionDeclaration() {}
-
virtual void accept0(Visitor *visitor);
};
@@ -2070,8 +1947,6 @@ public:
previous->next = this;
}
- virtual ~FormalParameterList() {}
-
virtual void accept0(Visitor *visitor);
inline FormalParameterList *finish ()
@@ -2097,8 +1972,6 @@ public:
elements (elts)
{ kind = K; }
- virtual ~FunctionBody() {}
-
virtual void accept0(Visitor *visitor);
// attributes
@@ -2114,8 +1987,6 @@ public:
elements (elts)
{ kind = K; }
- virtual ~Program() {}
-
virtual void accept0(Visitor *visitor);
// attributes
@@ -2139,8 +2010,6 @@ public:
previous->next = this;
}
- virtual ~SourceElements() {}
-
virtual void accept0(Visitor *visitor);
inline SourceElements *finish ()
@@ -2162,8 +2031,6 @@ public:
inline SourceElement()
{ kind = K; }
-
- virtual ~SourceElement() {}
};
class QML_PARSER_EXPORT FunctionSourceElement: public SourceElement
@@ -2175,8 +2042,6 @@ public:
declaration (f)
{ kind = K; }
- virtual ~FunctionSourceElement() {}
-
virtual void accept0(Visitor *visitor);
// attributes
@@ -2192,8 +2057,6 @@ public:
statement (stmt)
{ kind = K; }
- virtual ~StatementSourceElement() {}
-
virtual void accept0(Visitor *visitor);
// attributes
@@ -2208,8 +2071,6 @@ public:
DebuggerStatement()
{ kind = K; }
- virtual ~DebuggerStatement() {}
-
virtual void accept0(Visitor *visitor);
virtual SourceLocation firstSourceLocation() const
@@ -2256,8 +2117,6 @@ public:
previous->next = this;
}
- virtual ~UiQualifiedId() {}
-
UiQualifiedId *finish()
{
UiQualifiedId *head = next;
@@ -2459,8 +2318,6 @@ public:
previous->next = this;
}
- virtual ~UiParameterList() {}
-
virtual void accept0(Visitor *) {}
inline UiParameterList *finish ()
diff --git a/tests/auto/declarative/qdeclarativeitem/data/transformCrash.qml b/tests/auto/declarative/qdeclarativeitem/data/transformCrash.qml
new file mode 100644
index 0000000..ab7fa84
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeitem/data/transformCrash.qml
@@ -0,0 +1,13 @@
+import Qt 4.7
+
+Item {
+ id: wrapper
+ width: 200
+ height: 200
+
+ QtObject {
+ id: object
+ }
+
+ Component.onCompleted: wrapper.transform = object
+}
diff --git a/tests/auto/declarative/qdeclarativeitem/tst_qdeclarativeitem.cpp b/tests/auto/declarative/qdeclarativeitem/tst_qdeclarativeitem.cpp
index 00fcb6a..e9dad6b 100644
--- a/tests/auto/declarative/qdeclarativeitem/tst_qdeclarativeitem.cpp
+++ b/tests/auto/declarative/qdeclarativeitem/tst_qdeclarativeitem.cpp
@@ -81,6 +81,8 @@ private slots:
void resourcesProperty();
void mouseFocus();
+ void transformCrash();
+
private:
template<typename T>
T *findItem(QGraphicsObject *parent, const QString &objectName);
@@ -792,6 +794,16 @@ void tst_QDeclarativeItem::childrenRectBug3()
delete canvas;
}
+// QTBUG-13893
+void tst_QDeclarativeItem::transformCrash()
+{
+ QDeclarativeView *canvas = new QDeclarativeView(0);
+ canvas->setSource(QUrl::fromLocalFile(SRCDIR "/data/transformCrash.qml"));
+ canvas->show();
+
+ delete canvas;
+}
+
template<typename T>
T *tst_QDeclarativeItem::findItem(QGraphicsObject *parent, const QString &objectName)
{