summaryrefslogtreecommitdiffstats
path: root/src/declarative/fx/qfxitem.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/declarative/fx/qfxitem.cpp')
-rw-r--r--src/declarative/fx/qfxitem.cpp26
1 files changed, 12 insertions, 14 deletions
diff --git a/src/declarative/fx/qfxitem.cpp b/src/declarative/fx/qfxitem.cpp
index 7129757..648b0fb 100644
--- a/src/declarative/fx/qfxitem.cpp
+++ b/src/declarative/fx/qfxitem.cpp
@@ -792,12 +792,12 @@ QFxItem *QFxItem::qmlItem() const
}
/*!
- \qmlproperty string Item::qml
- This property holds the dynamic QML for the item.
+ \qmlproperty url Item::qml
+ This property holds the dynamic URL of the QML for the item.
This property is used for dynamically loading QML into the
item. Querying for the QML only has meaning if the QML has been
- dynamically set; otherwise an empty string is returned.
+ dynamically set; otherwise an empty URL is returned.
*/
/*! \fn void QFxItem::qmlChanged()
@@ -809,32 +809,31 @@ QFxItem *QFxItem::qmlItem() const
/*!
\property QFxItem::qml
- This property holds the dynamic QML for the item.
+ This property holds the dynamic URL of the QML for the item.
This property is used for dynamically loading QML into the
item. Querying for the QML only has meaning if the QML has been
- dynamically set; otherwise an empty string is returned.
+ dynamically set; otherwise an empty URL is returned.
*/
-QString QFxItem::qml() const
+QUrl QFxItem::qml() const
{
Q_D(const QFxItem);
return d->_qml;
}
-void QFxItem::setQml(const QString &qml)
+void QFxItem::setQml(const QUrl &qml)
{
Q_D(QFxItem);
if (d->_qml == qml)
return;
if (!d->_qml.isEmpty()) {
- QmlChildren::Iterator iter = d->_qmlChildren.find(d->_qml);
+ QmlChildren::Iterator iter = d->_qmlChildren.find(d->_qml.toString());
if (iter != d->_qmlChildren.end())
(*iter)->setOpacity(0.);
}
d->_qml = qml;
- d->_qmlurl = qmlContext(this)->resolvedUri(qml);
d->qmlItem = 0;
if (d->_qml.isEmpty()) {
@@ -842,14 +841,14 @@ void QFxItem::setQml(const QString &qml)
return;
}
- QmlChildren::Iterator iter = d->_qmlChildren.find(d->_qml);
+ QmlChildren::Iterator iter = d->_qmlChildren.find(d->_qml.toString());
if (iter != d->_qmlChildren.end()) {
(*iter)->setOpacity(1.);
d->qmlItem = (*iter);
emit qmlChanged();
} else {
d->_qmlcomp =
- new QmlComponent(qmlEngine(this), d->_qmlurl, this);
+ new QmlComponent(qmlEngine(this), d->_qml, this);
if (!d->_qmlcomp->isLoading())
qmlLoaded();
else
@@ -1491,9 +1490,8 @@ void QFxItem::setRotation(qreal rotation)
trans.rotate(d->_rotation, 0, 0, 1);
trans.translate(-to.x(), -to.y());
#else
- QTransform trans;
- QPointF to = transformOriginPoint();
- trans.translate(to.x(), to.y());
+ QPointF to = d->transformOrigin();
+ QTransform trans = QTransform::fromTranslate(to.x(), to.y());
trans.rotate(d->_rotation);
trans.translate(-to.x(), -to.y());
#endif