summaryrefslogtreecommitdiffstats
path: root/examples/widgets/doc/src/echoplugin.qdoc
diff options
context:
space:
mode:
authorDavid Schulz <david.schulz@digia.com>2012-11-30 09:28:11 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2012-11-30 23:56:49 +0100
commit4cbe999921be70a7ee10fa63cfb199ce82371bda (patch)
tree2e5e10fc84b8b2226989bb6a8b71e515febf68b3 /examples/widgets/doc/src/echoplugin.qdoc
parent5ce64dd7508934f8b301ce20e723c1075f6c4615 (diff)
QtBase: Docs: remove deprecated Q_EXPORT_PLUGIN2
... and add description for Q_PLUGIN_METADATA Change-Id: Ie389787df53d3cdfa27ba8fb0e77f32df1597c4f Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
Diffstat (limited to 'examples/widgets/doc/src/echoplugin.qdoc')
-rw-r--r--examples/widgets/doc/src/echoplugin.qdoc13
1 files changed, 4 insertions, 9 deletions
diff --git a/examples/widgets/doc/src/echoplugin.qdoc b/examples/widgets/doc/src/echoplugin.qdoc
index 52247bbb65..26250615e8 100644
--- a/examples/widgets/doc/src/echoplugin.qdoc
+++ b/examples/widgets/doc/src/echoplugin.qdoc
@@ -145,11 +145,13 @@
plugin. The Q_INTERFACES macro tells Qt which interfaces the class
implements. In our case we only implement the \c EchoInterface.
If a class implements more than one interface, they are given as
- a comma separated list.
+ a comma separated list. The Q_PLUGIN_METADATA macro is included next
+ to the Q_OBJECT macro. It contains the plugins IID and a filename
+ pointing to a json file containing the metadata for the plugin.
+ The json file is compiled into the plugin and does not need to be installed.
\snippet tools/echoplugin/plugin/echoplugin.h 0
-
\section1 EchoPlugin Class Implementation
Here is the implementation of \c echo():
@@ -158,13 +160,6 @@
We simply return the functions parameter.
- \snippet tools/echoplugin/plugin/echoplugin.cpp 1
-
- We use the Q_EXPORT_PLUGIN2 macro to let Qt know that the \c
- EchoPlugin class is a plugin. The first parameter is the name of
- the plugin; it is usual to give the plugin and the library file it
- is stored in the same name.
-
\section1 The \c main() function
\snippet tools/echoplugin/echowindow/main.cpp 0