diff options
author | Gabriel de Dietrich <gabriel.dedietrich@digia.com> | 2013-10-03 17:04:40 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-10-03 17:48:34 +0200 |
commit | 4ce2c0310c55c78b783b79c1f3fa2e0aa40fe6a2 (patch) | |
tree | 87377c239ce939b9ccb11680e326ca90ca9d44c0 /src/quick/items/qquickstateoperations.cpp | |
parent | df0347a9ed8be8e1d3d771c3d2abcfebec9ed87d (diff) |
Remane private QQuickAction into QQuickStateAction
This avoid symbol conflicts when statically linking with Qt Quick
Controls, that has its own QQuickAction class and which may become
public some day. (QQuickPropertyAction might be a more apt name, but
it's already taken).
Change-Id: Ia9514d63d38295603a89d8ec5a88815a651380f7
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
Diffstat (limited to 'src/quick/items/qquickstateoperations.cpp')
-rw-r--r-- | src/quick/items/qquickstateoperations.cpp | 50 |
1 files changed, 25 insertions, 25 deletions
diff --git a/src/quick/items/qquickstateoperations.cpp b/src/quick/items/qquickstateoperations.cpp index 705d2e490e..00c2103289 100644 --- a/src/quick/items/qquickstateoperations.cpp +++ b/src/quick/items/qquickstateoperations.cpp @@ -350,7 +350,7 @@ QQuickStateOperation::ActionList QQuickParentChange::actions() ActionList actions; - QQuickAction a; + QQuickStateAction a; a.event = this; actions << a; @@ -358,13 +358,13 @@ QQuickStateOperation::ActionList QQuickParentChange::actions() bool ok = false; qreal x = d->xString.value.numberLiteral(&ok); if (ok) { - QQuickAction xa(d->target, QLatin1String("x"), x); + QQuickStateAction xa(d->target, QLatin1String("x"), x); actions << xa; } else { QQmlBinding *newBinding = new QQmlBinding(d->xString.value, d->target, qmlContext(this)); QQmlProperty property(d->target, QLatin1String("x")); newBinding->setTarget(property); - QQuickAction xa; + QQuickStateAction xa; xa.property = property; xa.toBinding = QQmlAbstractBinding::getPointer(newBinding); xa.fromValue = xa.property.read(); @@ -377,13 +377,13 @@ QQuickStateOperation::ActionList QQuickParentChange::actions() bool ok = false; qreal y = d->yString.value.numberLiteral(&ok); if (ok) { - QQuickAction ya(d->target, QLatin1String("y"), y); + QQuickStateAction ya(d->target, QLatin1String("y"), y); actions << ya; } else { QQmlBinding *newBinding = new QQmlBinding(d->yString.value, d->target, qmlContext(this)); QQmlProperty property(d->target, QLatin1String("y")); newBinding->setTarget(property); - QQuickAction ya; + QQuickStateAction ya; ya.property = property; ya.toBinding = QQmlAbstractBinding::getPointer(newBinding); ya.fromValue = ya.property.read(); @@ -396,13 +396,13 @@ QQuickStateOperation::ActionList QQuickParentChange::actions() bool ok = false; qreal scale = d->scaleString.value.numberLiteral(&ok); if (ok) { - QQuickAction sa(d->target, QLatin1String("scale"), scale); + QQuickStateAction sa(d->target, QLatin1String("scale"), scale); actions << sa; } else { QQmlBinding *newBinding = new QQmlBinding(d->scaleString.value, d->target, qmlContext(this)); QQmlProperty property(d->target, QLatin1String("scale")); newBinding->setTarget(property); - QQuickAction sa; + QQuickStateAction sa; sa.property = property; sa.toBinding = QQmlAbstractBinding::getPointer(newBinding); sa.fromValue = sa.property.read(); @@ -415,13 +415,13 @@ QQuickStateOperation::ActionList QQuickParentChange::actions() bool ok = false; qreal rotation = d->rotationString.value.numberLiteral(&ok); if (ok) { - QQuickAction ra(d->target, QLatin1String("rotation"), rotation); + QQuickStateAction ra(d->target, QLatin1String("rotation"), rotation); actions << ra; } else { QQmlBinding *newBinding = new QQmlBinding(d->rotationString.value, d->target, qmlContext(this)); QQmlProperty property(d->target, QLatin1String("rotation")); newBinding->setTarget(property); - QQuickAction ra; + QQuickStateAction ra; ra.property = property; ra.toBinding = QQmlAbstractBinding::getPointer(newBinding); ra.fromValue = ra.property.read(); @@ -434,13 +434,13 @@ QQuickStateOperation::ActionList QQuickParentChange::actions() bool ok = false; qreal width = d->widthString.value.numberLiteral(&ok); if (ok) { - QQuickAction wa(d->target, QLatin1String("width"), width); + QQuickStateAction wa(d->target, QLatin1String("width"), width); actions << wa; } else { QQmlBinding *newBinding = new QQmlBinding(d->widthString.value, d->target, qmlContext(this)); QQmlProperty property(d->target, QLatin1String("width")); newBinding->setTarget(property); - QQuickAction wa; + QQuickStateAction wa; wa.property = property; wa.toBinding = QQmlAbstractBinding::getPointer(newBinding); wa.fromValue = wa.property.read(); @@ -453,13 +453,13 @@ QQuickStateOperation::ActionList QQuickParentChange::actions() bool ok = false; qreal height = d->heightString.value.numberLiteral(&ok); if (ok) { - QQuickAction ha(d->target, QLatin1String("height"), height); + QQuickStateAction ha(d->target, QLatin1String("height"), height); actions << ha; } else { QQmlBinding *newBinding = new QQmlBinding(d->heightString.value, d->target, qmlContext(this)); QQmlProperty property(d->target, QLatin1String("height")); newBinding->setTarget(property); - QQuickAction ha; + QQuickStateAction ha; ha.property = property; ha.toBinding = QQmlAbstractBinding::getPointer(newBinding); ha.fromValue = ha.property.read(); @@ -479,7 +479,7 @@ void QQuickParentChange::saveOriginals() d->origStackBefore = d->rewindStackBefore; } -/*void QQuickParentChange::copyOriginals(QQuickActionEvent *other) +/*void QQuickParentChange::copyOriginals(QQuickStateActionEvent *other) { Q_D(QQuickParentChange); QQuickParentChange *pc = static_cast<QQuickParentChange*>(other); @@ -507,12 +507,12 @@ void QQuickParentChange::reverse(Reason) d->doChange(d->origParent, d->origStackBefore); } -QQuickActionEvent::EventType QQuickParentChange::type() const +QQuickStateActionEvent::EventType QQuickParentChange::type() const { return ParentChange; } -bool QQuickParentChange::override(QQuickActionEvent*other) +bool QQuickParentChange::override(QQuickStateActionEvent*other) { Q_D(QQuickParentChange); if (other->type() != ParentChange) @@ -926,7 +926,7 @@ QQuickAnchorChanges::ActionList QQuickAnchorChanges::actions() d->baselineBinding->setTarget(d->baselineProp); } - QQuickAction a; + QQuickStateAction a; a.event = this; return ActionList() << a; } @@ -1191,22 +1191,22 @@ void QQuickAnchorChanges::reverse(Reason reason) d->target->setY(d->origY); } -QQuickActionEvent::EventType QQuickAnchorChanges::type() const +QQuickStateActionEvent::EventType QQuickAnchorChanges::type() const { return AnchorChanges; } -QList<QQuickAction> QQuickAnchorChanges::additionalActions() +QList<QQuickStateAction> QQuickAnchorChanges::additionalActions() { Q_D(QQuickAnchorChanges); - QList<QQuickAction> extra; + QList<QQuickStateAction> extra; QQuickAnchors::Anchors combined = d->anchorSet->d_func()->usedAnchors | d->anchorSet->d_func()->resetAnchors; bool hChange = combined & QQuickAnchors::Horizontal_Mask; bool vChange = combined & QQuickAnchors::Vertical_Mask; if (d->target) { - QQuickAction a; + QQuickStateAction a; if (hChange && d->fromX != d->toX) { a.property = QQmlProperty(d->target, QLatin1String("x")); a.toValue = d->toX; @@ -1265,7 +1265,7 @@ void QQuickAnchorChanges::saveOriginals() saveCurrentValues(); } -void QQuickAnchorChanges::copyOriginals(QQuickActionEvent *other) +void QQuickAnchorChanges::copyOriginals(QQuickStateActionEvent *other) { Q_D(QQuickAnchorChanges); QQuickAnchorChanges *ac = static_cast<QQuickAnchorChanges*>(other); @@ -1301,7 +1301,7 @@ void QQuickAnchorChanges::copyOriginals(QQuickActionEvent *other) << acp->topBinding << acp->bottomBinding << acp->vCenterBinding << acp->baselineBinding; //clear old values from other - //### could this be generalized for all QQuickActionEvents, and called after copyOriginals? + //### could this be generalized for all QQuickStateActionEvents, and called after copyOriginals? acp->leftBinding = 0; acp->rightBinding = 0; acp->hCenterBinding = 0; @@ -1368,11 +1368,11 @@ void QQuickAnchorChanges::clearBindings() } } -bool QQuickAnchorChanges::override(QQuickActionEvent*other) +bool QQuickAnchorChanges::override(QQuickStateActionEvent*other) { if (other->type() != AnchorChanges) return false; - if (static_cast<QQuickActionEvent*>(this) == other) + if (static_cast<QQuickStateActionEvent*>(this) == other) return true; if (static_cast<QQuickAnchorChanges*>(other)->object() == object()) return true; |