Doc: Replace outdated macro from docs
authorChristian Stenger <christian.stenger@digia.com>
Fri, 7 Dec 2012 09:47:00 +0000 (10:47 +0100)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Fri, 7 Dec 2012 12:37:34 +0000 (13:37 +0100)
Change-Id: I525c1322a46115f64fe94d48a0ebc2d4fb2e2e12
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
examples/designer/doc/src/containerextension.qdoc
examples/designer/doc/src/customwidgetplugin.qdoc
examples/designer/doc/src/taskmenuextension.qdoc
examples/designer/doc/src/worldtimeclockplugin.qdoc
examples/designer/worldtimeclockplugin/worldtimeclockplugin.h
src/designer/src/designer/doc/src/designer-manual.qdoc

index 8d4b5af..c97b028 100644 (file)
 
     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
 
     \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
index a1b945f..3206136 100644 (file)
@@ -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
index 6747618..e6dcae3 100644 (file)
 
     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
 
     \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
index 10eca79..58770a4 100644 (file)
     {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.
     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
index 753c94a..2973af7 100644 (file)
@@ -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:
index b3d15a6..834339e 100644 (file)
@@ -2501,7 +2501,7 @@ pixmap property in the property editor.
     that they export the symbols needed by \QD.
 
     First of all, the plugin class must be exported in order for the plugin to
-    be loaded by \QD. Use the Q_EXPORT_PLUGIN2() macro to do this. Also, the
+    be loaded by \QD. Use the Q_PLUGIN_METADATA() macro to do this. Also, the
     QDESIGNER_WIDGET_EXPORT macro must be used to define each custom widget class
     within a plugin, that \QD will instantiate.