diff options
author | Christian Stenger <christian.stenger@digia.com> | 2012-12-07 10:47:00 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2012-12-07 13:37:34 +0100 |
commit | 88b68964befccfa99b19e45c44cd0b0e60939a01 (patch) | |
tree | 6f83ce6946ee5049373bcb91ba63d4b3429da591 /examples | |
parent | 8b12e6f455ceb4fd0f5ee53266fc649d26b2de1e (diff) | |
download | qttools-88b68964befccfa99b19e45c44cd0b0e60939a01.tar.gz |
Doc: Replace outdated macro from docs
Change-Id: I525c1322a46115f64fe94d48a0ebc2d4fb2e2e12
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
Diffstat (limited to 'examples')
5 files changed, 11 insertions, 9 deletions
diff --git a/examples/designer/doc/src/containerextension.qdoc b/examples/designer/doc/src/containerextension.qdoc index 8d4b5afc6..c97b02871 100644 --- a/examples/designer/doc/src/containerextension.qdoc +++ b/examples/designer/doc/src/containerextension.qdoc @@ -101,7 +101,7 @@ The \c TEMPLATE variable's value makes \c qmake create the custom widget as a library. Later, we will ensure that the widget will be - recognized as a plugin by Qt by using the Q_EXPORT_PLUGIN2() macro + recognized as a plugin by Qt by using the Q_PLUGIN_METADATA() macro to export the relevant widget information. The \c CONFIG variable contains two values, \c designer and \c @@ -346,7 +346,7 @@ \snippet containerextension/multipagewidgetplugin.cpp 14 - Remember to use the Q_EXPORT_PLUGIN2() macro to export the + Remember to use the Q_PLUGIN_METADATA() macro to export the MultiPageWidgetPlugin class for use with Qt's plugin handling classes: This macro ensures that \QD can access and construct the custom widget. Without this macro, there is no way for \QD to use diff --git a/examples/designer/doc/src/customwidgetplugin.qdoc b/examples/designer/doc/src/customwidgetplugin.qdoc index a1b945fde..3206136bb 100644 --- a/examples/designer/doc/src/customwidgetplugin.qdoc +++ b/examples/designer/doc/src/customwidgetplugin.qdoc @@ -53,7 +53,7 @@ The \c TEMPLATE variable's value makes \c qmake create the custom widget as a library. Later, we will ensure that the widget will be - recognized as a plugin by Qt by using the Q_EXPORT_PLUGIN2() macro + recognized as a plugin by Qt by using the Q_PLUGIN_METADATA() macro to export the relevant widget information. The \c CONFIG variable contains two values, \c designer and \c @@ -95,7 +95,7 @@ alongside the other \QD plugins when the project is installed (using \c{make install} or an equivalent installation procedure). Later, we will ensure that it is recognized as a plugin by \QD by - using the Q_EXPORT_PLUGIN2() macro to export the relevant widget + using the Q_PLUGIN_METADATA() macro to export the relevant widget information. Note that if you want the plugins to appear in a Visual Studio diff --git a/examples/designer/doc/src/taskmenuextension.qdoc b/examples/designer/doc/src/taskmenuextension.qdoc index 674761876..e6dcae359 100644 --- a/examples/designer/doc/src/taskmenuextension.qdoc +++ b/examples/designer/doc/src/taskmenuextension.qdoc @@ -101,7 +101,7 @@ The \c TEMPLATE variable's value makes \c qmake create the custom widget as a library. Later, we will ensure that the widget will be - recognized as a plugin by Qt by using the Q_EXPORT_PLUGIN2() macro to + recognized as a plugin by Qt by using the Q_PLUGIN_METADATA() macro to export the relevant widget information. The \c CONFIG variable contains two values, \c designer and \c @@ -254,7 +254,7 @@ \snippet taskmenuextension/tictactoeplugin.cpp 4 - Finally, we use the Q_EXPORT_PLUGIN2() macro to export the + Finally, we use the Q_PLUGIN_METADATA() macro to export the TicTacToePlugin class for use with Qt's plugin handling classes: This macro ensures that \QD can access and construct the custom widget. Without this macro, there is no way for \QD to use the diff --git a/examples/designer/doc/src/worldtimeclockplugin.qdoc b/examples/designer/doc/src/worldtimeclockplugin.qdoc index 10eca79fd..58770a4a5 100644 --- a/examples/designer/doc/src/worldtimeclockplugin.qdoc +++ b/examples/designer/doc/src/worldtimeclockplugin.qdoc @@ -129,10 +129,10 @@ {customwidgetplugin}{Custom Widget Plugin} example (only the class name and the implementation of QDesignerCustomWidgetInterface::domXml() differ). The main thing - to remember is to use the Q_EXPORT_PLUGIN2() macro to export the \c + to remember is to use the Q_PLUGIN_METADATA() macro to export the \c WorldTimeClockPlugin class for use with \QD: - \snippet worldtimeclockplugin/worldtimeclockplugin.cpp 0 + \snippet worldtimeclockplugin/worldtimeclockplugin.h 1 Without this macro, there is no way for Qt Designer to use the widget. @@ -182,7 +182,7 @@ alongside the other \QD plugins when the project is installed (using \c{make install} or an equivalent installation procedure). Later, we will ensure that it is recognized as a plugin by \QD by - using the Q_EXPORT_PLUGIN2() macro to export the relevant widget + using the Q_PLUGIN_METADATA() macro to export the relevant widget information. Note that if you want the plugins to appear in a Visual Studio diff --git a/examples/designer/worldtimeclockplugin/worldtimeclockplugin.h b/examples/designer/worldtimeclockplugin/worldtimeclockplugin.h index 753c94aa0..2973af7e4 100644 --- a/examples/designer/worldtimeclockplugin/worldtimeclockplugin.h +++ b/examples/designer/worldtimeclockplugin/worldtimeclockplugin.h @@ -48,7 +48,9 @@ class WorldTimeClockPlugin : public QObject, public QDesignerCustomWidgetInterface { Q_OBJECT +//! [1] Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QDesignerCustomWidgetInterface" FILE "worldtimeclock.json") +//! [1] Q_INTERFACES(QDesignerCustomWidgetInterface) public: |