summaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorBea Lam <bea.lam@nokia.com>2010-04-19 06:30:56 (GMT)
committerBea Lam <bea.lam@nokia.com>2010-04-19 06:50:52 (GMT)
commit9943a3ef522f293c26af0c65b0bc0a1df02a417d (patch)
tree74611818369e69141e13cdf385d75ad7cc90d85e /doc
parent2a9a22c7464b706c1e1998e10910b8f99528c6c4 (diff)
downloadQt-9943a3ef522f293c26af0c65b0bc0a1df02a417d.zip
Qt-9943a3ef522f293c26af0c65b0bc0a1df02a417d.tar.gz
Qt-9943a3ef522f293c26af0c65b0bc0a1df02a417d.tar.bz2
QML_DECLARE_TYPE is no longer necessary - fix docs and examples
Diffstat (limited to 'doc')
-rw-r--r--doc/src/declarative/extending-examples.qdoc5
-rw-r--r--doc/src/declarative/extending.qdoc1
-rw-r--r--doc/src/declarative/integrating.qdoc3
-rw-r--r--doc/src/declarative/snippets/integrating/graphicswidgets/bluecircle.h3
-rw-r--r--doc/src/declarative/snippets/integrating/graphicswidgets/redsquare.h3
5 files changed, 1 insertions, 14 deletions
diff --git a/doc/src/declarative/extending-examples.qdoc b/doc/src/declarative/extending-examples.qdoc
index cc66838..307162e 100644
--- a/doc/src/declarative/extending-examples.qdoc
+++ b/doc/src/declarative/extending-examples.qdoc
@@ -57,11 +57,6 @@ element, the C++ class can be named differently, or appear in a namespace.
\snippet examples/declarative/extending/adding/person.h 0
-Following the class declaration, we include the QML_DECLARE_TYPE() macro. This
-is necessary to declare the type to QML. It also includes the logic necessary
-to expose the class to Qt's meta system - that is, it includes the
-Q_DECLARE_METATYPE() functionality.
-
\section1 Define the Person class
\snippet examples/declarative/extending/adding/person.cpp 0
diff --git a/doc/src/declarative/extending.qdoc b/doc/src/declarative/extending.qdoc
index 4d477c6..a1d8a10 100644
--- a/doc/src/declarative/extending.qdoc
+++ b/doc/src/declarative/extending.qdoc
@@ -305,7 +305,6 @@ public:
};
QML_DECLARE_TYPEINFO(MyType, QML_HAS_ATTACHED_PROPERTIES)
-QML_DECLARE_TYPE(MyType)
\endcode
Return an attachment object, of type \a AttachedPropertiesType, for the
attachee \a object instance. It is customary, though not strictly required, for
diff --git a/doc/src/declarative/integrating.qdoc b/doc/src/declarative/integrating.qdoc
index d4034fa..65413ec 100644
--- a/doc/src/declarative/integrating.qdoc
+++ b/doc/src/declarative/integrating.qdoc
@@ -115,8 +115,7 @@ any custom C++ types and create a plugin that registers the custom types
so that they can be used from your QML file.
Here is an example. Suppose you have two classes, \c RedSquare and \c BlueCircle,
-that both inherit from QGraphicsWidget. First, you need to register these two types
-using the \c QML_DECLARE_TYPE macro from \c <QtDeclarative/qdeclarative.h>, like this:
+that both inherit from QGraphicsWidget:
\c [graphicswidgets/redsquare.h]
\snippet doc/src/declarative/snippets/integrating/graphicswidgets/redsquare.h 0
diff --git a/doc/src/declarative/snippets/integrating/graphicswidgets/bluecircle.h b/doc/src/declarative/snippets/integrating/graphicswidgets/bluecircle.h
index 028718f..73d66b7 100644
--- a/doc/src/declarative/snippets/integrating/graphicswidgets/bluecircle.h
+++ b/doc/src/declarative/snippets/integrating/graphicswidgets/bluecircle.h
@@ -39,7 +39,6 @@
**
****************************************************************************/
//![0]
-#include <QtDeclarative/qdeclarative.h>
#include <QGraphicsWidget>
#include <QPainter>
@@ -53,6 +52,4 @@ public:
painter->drawEllipse(0, 0, size().width(), size().height());
}
};
-
-QML_DECLARE_TYPE(BlueCircle)
//![0]
diff --git a/doc/src/declarative/snippets/integrating/graphicswidgets/redsquare.h b/doc/src/declarative/snippets/integrating/graphicswidgets/redsquare.h
index 76e7d11..3050662 100644
--- a/doc/src/declarative/snippets/integrating/graphicswidgets/redsquare.h
+++ b/doc/src/declarative/snippets/integrating/graphicswidgets/redsquare.h
@@ -39,7 +39,6 @@
**
****************************************************************************/
//![0]
-#include <QtDeclarative/qdeclarative.h>
#include <QGraphicsWidget>
#include <QPainter>
@@ -52,6 +51,4 @@ public:
painter->fillRect(0, 0, size().width(), size().height(), QColor(Qt::red));
}
};
-
-QML_DECLARE_TYPE(RedSquare)
//![0]