From 4cbe999921be70a7ee10fa63cfb199ce82371bda Mon Sep 17 00:00:00 2001 From: David Schulz Date: Fri, 30 Nov 2012 09:28:11 +0100 Subject: QtBase: Docs: remove deprecated Q_EXPORT_PLUGIN2 ... and add description for Q_PLUGIN_METADATA Change-Id: Ie389787df53d3cdfa27ba8fb0e77f32df1597c4f Reviewed-by: Gunnar Sletta --- examples/widgets/doc/src/echoplugin.qdoc | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) (limited to 'examples/widgets/doc/src/echoplugin.qdoc') 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 -- cgit v1.2.3