summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAaron Kennedy <aaron.kennedy@nokia.com>2010-02-23 04:24:20 (GMT)
committerAaron Kennedy <aaron.kennedy@nokia.com>2010-02-23 06:19:10 (GMT)
commitcd8d8d49f78c1cbb8ad3546e66a461b9e6e29ff5 (patch)
tree1fbbbfec0a5ea7a1ce0c00684f83c34e8278e18e /src
parent113e350e36c0ff31824bc238160094814dc3fb4f (diff)
downloadQt-cd8d8d49f78c1cbb8ad3546e66a461b9e6e29ff5.zip
Qt-cd8d8d49f78c1cbb8ad3546e66a461b9e6e29ff5.tar.gz
Qt-cd8d8d49f78c1cbb8ad3546e66a461b9e6e29ff5.tar.bz2
Make QmlBinding (and friends) private
QmlBinding exposes way too many implementation details to be confident about making it public right now.
Diffstat (limited to 'src')
-rw-r--r--src/declarative/qml/qml.pri2
-rw-r--r--src/declarative/qml/qmlbinding.cpp2
-rw-r--r--src/declarative/qml/qmlbinding.h132
-rw-r--r--src/declarative/qml/qmlbinding_p.h76
-rw-r--r--src/declarative/qml/qmlbinding_p_p.h89
-rw-r--r--src/declarative/qml/qmlcompiledbindings_p.h2
-rw-r--r--src/declarative/qml/qmlcompiler.cpp2
-rw-r--r--src/declarative/qml/qmlcomponent.cpp2
-rw-r--r--src/declarative/qml/qmlengine.cpp2
-rw-r--r--src/declarative/qml/qmlenginedebug.cpp2
-rw-r--r--src/declarative/qml/qmlmetaproperty.cpp2
-rw-r--r--src/declarative/qml/qmlobjectscriptclass.cpp2
-rw-r--r--src/declarative/qml/qmlpropertycache.cpp4
-rw-r--r--src/declarative/qml/qmlvme.cpp4
-rw-r--r--src/declarative/util/qmlpropertychanges.cpp2
-rw-r--r--src/declarative/util/qmlstate.cpp2
-rw-r--r--src/declarative/util/qmlstategroup.cpp2
-rw-r--r--src/declarative/util/qmltransitionmanager.cpp2
18 files changed, 167 insertions, 164 deletions
diff --git a/src/declarative/qml/qml.pri b/src/declarative/qml/qml.pri
index 2313c37..f09a944 100644
--- a/src/declarative/qml/qml.pri
+++ b/src/declarative/qml/qml.pri
@@ -60,8 +60,8 @@ HEADERS += \
$$PWD/qmlinstruction_p.h \
$$PWD/qmlvmemetaobject_p.h \
$$PWD/qml.h \
- $$PWD/qmlbinding.h \
$$PWD/qmlbinding_p.h \
+ $$PWD/qmlbinding_p_p.h \
$$PWD/qmlmetaproperty.h \
$$PWD/qmlmoduleplugin.h \
$$PWD/qmlcomponent.h \
diff --git a/src/declarative/qml/qmlbinding.cpp b/src/declarative/qml/qmlbinding.cpp
index feadd0f..9f93fee 100644
--- a/src/declarative/qml/qmlbinding.cpp
+++ b/src/declarative/qml/qmlbinding.cpp
@@ -39,8 +39,8 @@
**
****************************************************************************/
-#include "qmlbinding.h"
#include "qmlbinding_p.h"
+#include "qmlbinding_p_p.h"
#include "qml.h"
#include "qmlcontext.h"
diff --git a/src/declarative/qml/qmlbinding.h b/src/declarative/qml/qmlbinding.h
deleted file mode 100644
index 151b71c..0000000
--- a/src/declarative/qml/qmlbinding.h
+++ /dev/null
@@ -1,132 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (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 Technology Preview License Agreement accompanying
-** this package.
-**
-** 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.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef QMLBINDING_H
-#define QMLBINDING_H
-
-#include "qml.h"
-#include "qmlpropertyvaluesource.h"
-#include "qmlexpression.h"
-
-#include <QtCore/QObject>
-#include <QtCore/QMetaProperty>
-
-QT_BEGIN_HEADER
-
-QT_BEGIN_NAMESPACE
-
-QT_MODULE(Declarative)
-
-class Q_DECLARATIVE_EXPORT QmlAbstractBinding
-{
-public:
- QmlAbstractBinding();
- virtual ~QmlAbstractBinding();
-
- virtual void destroy();
-
- virtual QString expression() const;
-
- void setEnabled(bool e) { setEnabled(e, QmlMetaProperty::DontRemoveBinding); }
- virtual void setEnabled(bool, QmlMetaProperty::WriteFlags) = 0;
- virtual int propertyIndex() = 0;
-
- void update() { update(QmlMetaProperty::DontRemoveBinding); }
- virtual void update(QmlMetaProperty::WriteFlags) = 0;
-
- void addToObject(QObject *);
- void removeFromObject();
-
-protected:
- void clear();
-
-private:
- friend class QmlDeclarativeData;
- friend class QmlMetaProperty;
- friend class QmlMetaPropertyPrivate;
- friend class QmlVME;
-
- QObject *m_object;
- QmlAbstractBinding **m_mePtr;
- QmlAbstractBinding **m_prevBinding;
- QmlAbstractBinding *m_nextBinding;
-};
-
-class QmlContext;
-class QmlBindingPrivate;
-class Q_DECLARATIVE_EXPORT QmlBinding : public QmlExpression,
- public QmlAbstractBinding
-{
-Q_OBJECT
-public:
- QmlBinding(const QString &, QObject *, QmlContext *, QObject *parent=0);
- QmlBinding(void *, QmlRefCount *, QObject *, QmlContext *, const QString &, int,
- QObject *parent);
- ~QmlBinding();
-
- void setTarget(const QmlMetaProperty &);
- QmlMetaProperty property() const;
-
- bool enabled() const;
-
- // Inherited from QmlAbstractBinding
- virtual void setEnabled(bool, QmlMetaProperty::WriteFlags flags);
- virtual int propertyIndex();
- virtual void update(QmlMetaProperty::WriteFlags flags);
- virtual QString expression() const;
-
-public Q_SLOTS:
- void update() { update(QmlMetaProperty::DontRemoveBinding); }
-
-protected:
- void emitValueChanged();
-
-private:
- Q_DECLARE_PRIVATE(QmlBinding)
-};
-
-QT_END_NAMESPACE
-
-QML_DECLARE_TYPE(QmlBinding);
-
-QT_END_HEADER
-
-#endif // QMLBINDING_H
diff --git a/src/declarative/qml/qmlbinding_p.h b/src/declarative/qml/qmlbinding_p.h
index b4f88b5..4594476 100644
--- a/src/declarative/qml/qmlbinding_p.h
+++ b/src/declarative/qml/qmlbinding_p.h
@@ -53,36 +53,82 @@
// We mean it.
//
-#include "qmlbinding.h"
+#include "qml.h"
+#include "qmlpropertyvaluesource.h"
+#include "qmlexpression.h"
-#include "qmlmetaproperty.h"
-#include "qmlexpression_p.h"
+#include <QtCore/QObject>
+#include <QtCore/QMetaProperty>
QT_BEGIN_NAMESPACE
-class QmlBindingData : public QmlExpressionData
+class Q_AUTOTEST_EXPORT QmlAbstractBinding
{
public:
- QmlBindingData();
- virtual ~QmlBindingData();
+ QmlAbstractBinding();
+ virtual ~QmlAbstractBinding();
- bool updating:1;
- bool enabled:1;
+ virtual void destroy();
- QmlMetaProperty property;
+ virtual QString expression() const;
- virtual void refresh();
+ void setEnabled(bool e) { setEnabled(e, QmlMetaProperty::DontRemoveBinding); }
+ virtual void setEnabled(bool, QmlMetaProperty::WriteFlags) = 0;
+ virtual int propertyIndex() = 0;
+
+ void update() { update(QmlMetaProperty::DontRemoveBinding); }
+ virtual void update(QmlMetaProperty::WriteFlags) = 0;
+
+ void addToObject(QObject *);
+ void removeFromObject();
+
+protected:
+ void clear();
+
+private:
+ friend class QmlDeclarativeData;
+ friend class QmlMetaProperty;
+ friend class QmlMetaPropertyPrivate;
+ friend class QmlVME;
+
+ QObject *m_object;
+ QmlAbstractBinding **m_mePtr;
+ QmlAbstractBinding **m_prevBinding;
+ QmlAbstractBinding *m_nextBinding;
};
-class QmlBindingPrivate : public QmlExpressionPrivate
+class QmlContext;
+class QmlBindingPrivate;
+class Q_AUTOTEST_EXPORT QmlBinding : public QmlExpression, public QmlAbstractBinding
{
- Q_DECLARE_PUBLIC(QmlBinding)
+Q_OBJECT
public:
- QmlBindingPrivate();
+ QmlBinding(const QString &, QObject *, QmlContext *, QObject *parent=0);
+ QmlBinding(void *, QmlRefCount *, QObject *, QmlContext *, const QString &, int,
+ QObject *parent);
+ ~QmlBinding();
+
+ void setTarget(const QmlMetaProperty &);
+ QmlMetaProperty property() const;
+
+ bool enabled() const;
+
+ // Inherited from QmlAbstractBinding
+ virtual void setEnabled(bool, QmlMetaProperty::WriteFlags flags);
+ virtual int propertyIndex();
+ virtual void update(QmlMetaProperty::WriteFlags flags);
+ virtual QString expression() const;
+
+public Q_SLOTS:
+ void update() { update(QmlMetaProperty::DontRemoveBinding); }
+
+protected:
+ void emitValueChanged();
- QmlBindingData *bindingData() { return static_cast<QmlBindingData *>(data); }
- const QmlBindingData *bindingData() const { return static_cast<const QmlBindingData *>(data); }
+private:
+ Q_DECLARE_PRIVATE(QmlBinding)
};
+Q_DECLARE_METATYPE(QmlBinding*);
QT_END_NAMESPACE
diff --git a/src/declarative/qml/qmlbinding_p_p.h b/src/declarative/qml/qmlbinding_p_p.h
new file mode 100644
index 0000000..e5a06fc
--- /dev/null
+++ b/src/declarative/qml/qmlbinding_p_p.h
@@ -0,0 +1,89 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (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 Technology Preview License Agreement accompanying
+** this package.
+**
+** 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.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QMLBINDING_P_P_H
+#define QMLBINDING_P_P_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+#include "qmlbinding_p.h"
+
+#include "qmlmetaproperty.h"
+#include "qmlexpression_p.h"
+
+QT_BEGIN_NAMESPACE
+
+class QmlBindingData : public QmlExpressionData
+{
+public:
+ QmlBindingData();
+ virtual ~QmlBindingData();
+
+ bool updating:1;
+ bool enabled:1;
+
+ QmlMetaProperty property;
+
+ virtual void refresh();
+};
+
+class QmlBindingPrivate : public QmlExpressionPrivate
+{
+ Q_DECLARE_PUBLIC(QmlBinding)
+public:
+ QmlBindingPrivate();
+
+ QmlBindingData *bindingData() { return static_cast<QmlBindingData *>(data); }
+ const QmlBindingData *bindingData() const { return static_cast<const QmlBindingData *>(data); }
+};
+
+QT_END_NAMESPACE
+
+#endif // QMLBINDING_P_P_H
diff --git a/src/declarative/qml/qmlcompiledbindings_p.h b/src/declarative/qml/qmlcompiledbindings_p.h
index 38fb2a3..056cc21 100644
--- a/src/declarative/qml/qmlcompiledbindings_p.h
+++ b/src/declarative/qml/qmlcompiledbindings_p.h
@@ -54,7 +54,7 @@
//
#include "qmlexpression_p.h"
-#include "qmlbinding.h"
+#include "qmlbinding_p.h"
QT_BEGIN_HEADER
diff --git a/src/declarative/qml/qmlcompiler.cpp b/src/declarative/qml/qmlcompiler.cpp
index bbae201..10b6e4f 100644
--- a/src/declarative/qml/qmlcompiler.cpp
+++ b/src/declarative/qml/qmlcompiler.cpp
@@ -63,7 +63,7 @@
#include "qmlscriptstring.h"
#include "qmlglobal_p.h"
#include "qmlscriptparser_p.h"
-#include "qmlbinding.h"
+#include "qmlbinding_p.h"
#include "qmlcompiledbindings_p.h"
#include <qfxperf_p_p.h>
diff --git a/src/declarative/qml/qmlcomponent.cpp b/src/declarative/qml/qmlcomponent.cpp
index 87ecb8a..4ab4f70 100644
--- a/src/declarative/qml/qmlcomponent.cpp
+++ b/src/declarative/qml/qmlcomponent.cpp
@@ -49,8 +49,8 @@
#include "qmlvme_p.h"
#include "qml.h"
#include "qmlengine.h"
-#include "qmlbinding.h"
#include "qmlbinding_p.h"
+#include "qmlbinding_p_p.h"
#include "qmlglobal_p.h"
#include "qmlscriptparser_p.h"
diff --git a/src/declarative/qml/qmlengine.cpp b/src/declarative/qml/qmlengine.cpp
index 97d8250..2460f52 100644
--- a/src/declarative/qml/qmlengine.cpp
+++ b/src/declarative/qml/qmlengine.cpp
@@ -51,7 +51,7 @@
#include "qmlcomponent.h"
#include "qmlmetaproperty_p.h"
#include "qmlmoduleplugin.h"
-#include "qmlbinding_p.h"
+#include "qmlbinding_p_p.h"
#include "qmlvme_p.h"
#include "qmlenginedebug_p.h"
#include "qmlstringconverters_p.h"
diff --git a/src/declarative/qml/qmlenginedebug.cpp b/src/declarative/qml/qmlenginedebug.cpp
index 654157c..2ab709a 100644
--- a/src/declarative/qml/qmlenginedebug.cpp
+++ b/src/declarative/qml/qmlenginedebug.cpp
@@ -45,7 +45,7 @@
#include "qmlengine.h"
#include "qmlmetatype.h"
#include "qmlmetaproperty.h"
-#include "qmlbinding.h"
+#include "qmlbinding_p.h"
#include "qmlcontext_p.h"
#include "qmlwatcher_p.h"
diff --git a/src/declarative/qml/qmlmetaproperty.cpp b/src/declarative/qml/qmlmetaproperty.cpp
index 1742c43..ac619ec 100644
--- a/src/declarative/qml/qmlmetaproperty.cpp
+++ b/src/declarative/qml/qmlmetaproperty.cpp
@@ -44,7 +44,7 @@
#include "qmlcompositetypedata_p.h"
#include "qml.h"
-#include "qmlbinding.h"
+#include "qmlbinding_p.h"
#include "qmlcontext.h"
#include "qmlcontext_p.h"
#include "qmlboundsignal_p.h"
diff --git a/src/declarative/qml/qmlobjectscriptclass.cpp b/src/declarative/qml/qmlobjectscriptclass.cpp
index 15ece1d..155a7d6 100644
--- a/src/declarative/qml/qmlobjectscriptclass.cpp
+++ b/src/declarative/qml/qmlobjectscriptclass.cpp
@@ -46,7 +46,7 @@
#include "qmldeclarativedata_p.h"
#include "qmltypenamescriptclass_p.h"
#include "qmllistscriptclass_p.h"
-#include "qmlbinding.h"
+#include "qmlbinding_p.h"
#include "qmlguard_p.h"
#include "qmlvmemetaobject_p.h"
diff --git a/src/declarative/qml/qmlpropertycache.cpp b/src/declarative/qml/qmlpropertycache.cpp
index a3e655b..2d087b6 100644
--- a/src/declarative/qml/qmlpropertycache.cpp
+++ b/src/declarative/qml/qmlpropertycache.cpp
@@ -42,8 +42,8 @@
#include "qmlpropertycache_p.h"
#include "qmlengine_p.h"
-#include "qmlbinding.h"
-#include "qdebug.h"
+#include "qmlbinding_p.h"
+#include <QtCore/qdebug.h>
Q_DECLARE_METATYPE(QScriptValue);
diff --git a/src/declarative/qml/qmlvme.cpp b/src/declarative/qml/qmlvme.cpp
index 8655809..f8f1ff0 100644
--- a/src/declarative/qml/qmlvme.cpp
+++ b/src/declarative/qml/qmlvme.cpp
@@ -51,11 +51,11 @@
#include "qmlengine.h"
#include "qmlcontext.h"
#include "qmlcomponent.h"
-#include "qmlbinding.h"
+#include "qmlbinding_p.h"
#include "qmlengine_p.h"
#include "qmlcomponent_p.h"
#include "qmlvmemetaobject_p.h"
-#include "qmlbinding_p.h"
+#include "qmlbinding_p_p.h"
#include "qmlcontext_p.h"
#include "qmlcompiledbindings_p.h"
#include "qmlglobal_p.h"
diff --git a/src/declarative/util/qmlpropertychanges.cpp b/src/declarative/util/qmlpropertychanges.cpp
index 068cb4d..0ce3604 100644
--- a/src/declarative/util/qmlpropertychanges.cpp
+++ b/src/declarative/util/qmlpropertychanges.cpp
@@ -47,7 +47,7 @@
#include <qmlcustomparser_p.h>
#include <qmlparser_p.h>
#include <qmlexpression.h>
-#include <qmlbinding.h>
+#include <qmlbinding_p.h>
#include <qmlcontext.h>
#include <qmlguard_p.h>
diff --git a/src/declarative/util/qmlstate.cpp b/src/declarative/util/qmlstate.cpp
index 4462b1f..ea99bd5 100644
--- a/src/declarative/util/qmlstate.cpp
+++ b/src/declarative/util/qmlstate.cpp
@@ -48,7 +48,7 @@
#include "qmlanimation_p.h"
#include "qmlanimation_p_p.h"
-#include <qmlbinding.h>
+#include <qmlbinding_p.h>
#include <qmlglobal_p.h>
#include <QtCore/qdebug.h>
diff --git a/src/declarative/util/qmlstategroup.cpp b/src/declarative/util/qmlstategroup.cpp
index 4ad77c8..7a5db1b 100644
--- a/src/declarative/util/qmlstategroup.cpp
+++ b/src/declarative/util/qmlstategroup.cpp
@@ -44,7 +44,7 @@
#include "qmltransition_p.h"
#include "qmlstate_p_p.h"
-#include <qmlbinding.h>
+#include <qmlbinding_p.h>
#include <qmlglobal_p.h>
#include <QtCore/qdebug.h>
diff --git a/src/declarative/util/qmltransitionmanager.cpp b/src/declarative/util/qmltransitionmanager.cpp
index f2a4d64..60d9a60 100644
--- a/src/declarative/util/qmltransitionmanager.cpp
+++ b/src/declarative/util/qmltransitionmanager.cpp
@@ -43,7 +43,7 @@
#include "qmlstate_p_p.h"
-#include <qmlbinding.h>
+#include <qmlbinding_p.h>
#include <qmlglobal_p.h>
QT_BEGIN_NAMESPACE