aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@theqtcompany.com>2015-04-16 11:56:07 +0200
committerSimon Hausmann <simon.hausmann@theqtcompany.com>2015-04-27 07:44:43 +0000
commit80defcb0c01d747f331719c0f89992d6db660f98 (patch)
treebde0d4519047a9d791ae272e6c65c7772e34fe19 /src/qml/qml
parent0e14a46f60124d9da1101fe7766c7d85e2b72e64 (diff)
Get rid of QQmlBinding::property()
The method is slow and not required anymore Change-Id: I8c2bc6eeedbd15b901b60aa08408fe8c32a81707 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Diffstat (limited to 'src/qml/qml')
-rw-r--r--src/qml/qml/qqmlbinding.cpp7
-rw-r--r--src/qml/qml/qqmlbinding_p.h1
-rw-r--r--src/qml/qml/qqmlproperty.cpp5
-rw-r--r--src/qml/qml/qqmlproperty_p.h3
4 files changed, 8 insertions, 8 deletions
diff --git a/src/qml/qml/qqmlbinding.cpp b/src/qml/qml/qqmlbinding.cpp
index cfcca18d37..0e56a67cf7 100644
--- a/src/qml/qml/qqmlbinding.cpp
+++ b/src/qml/qml/qqmlbinding.cpp
@@ -217,7 +217,7 @@ void QQmlBinding::update(QQmlPropertyPrivate::WriteFlags flags)
if (!watcher.wasDeleted())
setUpdatingFlag(false);
} else {
- QQmlProperty p = property();
+ QQmlProperty p = QQmlPropertyPrivate::restore(targetObject(), m_core, 0);
QQmlAbstractBinding::printBindingLoopError(p);
}
}
@@ -334,9 +334,4 @@ void QQmlBinding::setTarget(QObject *object, const QQmlPropertyData &core)
}
}
-QQmlProperty QQmlBinding::property() const
-{
- return QQmlPropertyPrivate::restore(targetObject(), m_core, 0);
-}
-
QT_END_NAMESPACE
diff --git a/src/qml/qml/qqmlbinding_p.h b/src/qml/qml/qqmlbinding_p.h
index 6ffb5a756a..3dbf26d1a8 100644
--- a/src/qml/qml/qqmlbinding_p.h
+++ b/src/qml/qml/qqmlbinding_p.h
@@ -75,7 +75,6 @@ public:
void setTarget(const QQmlProperty &);
void setTarget(QObject *, const QQmlPropertyData &);
- QQmlProperty property() const;
void setNotifyOnValueChanged(bool);
diff --git a/src/qml/qml/qqmlproperty.cpp b/src/qml/qml/qqmlproperty.cpp
index cd59c2dd41..94b90e910a 100644
--- a/src/qml/qml/qqmlproperty.cpp
+++ b/src/qml/qml/qqmlproperty.cpp
@@ -768,6 +768,11 @@ static QQmlAbstractBinding *removeOldBinding(QObject *object, int index, QQmlPro
return oldBinding;
}
+QQmlAbstractBinding *QQmlPropertyPrivate::removeBinding(QQmlAbstractBinding *b, QQmlPropertyPrivate::BindingFlag flags)
+{
+ return removeBinding(b->targetObject(), b->targetPropertyIndex(), flags);
+}
+
QQmlAbstractBinding *QQmlPropertyPrivate::removeBinding(QObject *o, int index, QQmlPropertyPrivate::BindingFlag flags)
{
Q_ASSERT(o);
diff --git a/src/qml/qml/qqmlproperty_p.h b/src/qml/qml/qqmlproperty_p.h
index b6b5421999..9b735669b8 100644
--- a/src/qml/qml/qqmlproperty_p.h
+++ b/src/qml/qml/qqmlproperty_p.h
@@ -114,7 +114,8 @@ public:
static void setBinding(QQmlAbstractBinding *binding, BindingFlags flags = None, WriteFlags writeFlags = DontRemoveBinding);
static QQmlAbstractBinding *removeBinding(const QQmlProperty &that, BindingFlag flag = None);
- static QQmlAbstractBinding *removeBinding(QObject *o, int index, BindingFlag flag = None);
+ static QQmlAbstractBinding *removeBinding(QObject *o, int index, QQmlPropertyPrivate::BindingFlag flags = None);
+ static QQmlAbstractBinding *removeBinding(QQmlAbstractBinding *b, BindingFlag flag = None);
static QQmlAbstractBinding *binding(QObject *, int coreIndex,
int valueTypeIndex /* -1 */);