From cae970c68663c320bcce86160d44d857bfc68fd0 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Wed, 16 Apr 2014 21:19:07 +0200 Subject: doc fixes Change-Id: I77da456b89accd7fc363471fe8e370da17e2fdcc Reviewed-by: Leena Miettinen Reviewed-by: Joerg Bornemann --- src/corelib/doc/src/plugins-howto.qdoc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/corelib/doc') diff --git a/src/corelib/doc/src/plugins-howto.qdoc b/src/corelib/doc/src/plugins-howto.qdoc index 7565d610cc..7fc4682fd4 100644 --- a/src/corelib/doc/src/plugins-howto.qdoc +++ b/src/corelib/doc/src/plugins-howto.qdoc @@ -234,7 +234,7 @@ application is to compile it into a dynamic library that is shipped separately, and detected and loaded at runtime. - Plugins can be linked statically against your application. If you + Plugins can be linked statically into your application. If you build the static version of Qt, this is the only option for including Qt's predefined plugins. Using static plugins makes the deployment less error-prone, but has the disadvantage that no @@ -253,7 +253,8 @@ \row \li \c qico \li Image formats \li ICO \row \li \c qsvg \li Image formats \li SVG \row \li \c qtiff \li Image formats \li TIFF - \row \li \c qsqldb2 \li SQL driver \li IBM DB2 \row \li \c qsqlibase \li SQL driver \li Borland InterBase + \row \li \c qsqldb2 \li SQL driver \li IBM DB2 + \row \li \c qsqlibase \li SQL driver \li Borland InterBase \row \li \c qsqlite \li SQL driver \li SQLite version 3 \row \li \c qsqlite2 \li SQL driver \li SQLite version 2 \row \li \c qsqlmysql \li SQL driver \li MySQL @@ -263,7 +264,7 @@ \row \li \c qsqltds \li SQL driver \li Sybase Adaptive Server (TDS) \endtable - To link statically against those plugins, you need to add + To link those plugins statically, you need to add the required plugins to your build using \c QTPLUGIN. Q_IMPORT_PLUGIN() macros are also needed in application code, but those are automatically generated by qmake and added to -- cgit v1.2.3 From 06fef71775c187de690dc54749956bad62cda2f5 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Wed, 16 Apr 2014 15:43:29 +0200 Subject: document new QTPLUGIN magic Change-Id: Ia12f55a3e6bd670cb95c21c8f896b0451dd63693 Reviewed-by: Fawzi Mohamed Reviewed-by: Leena Miettinen Reviewed-by: Oswald Buddenhagen --- .../doc/snippets/code/doc_src_plugins-howto.pro | 4 +- src/corelib/doc/src/plugins-howto.qdoc | 43 +++++++++++++++------- 2 files changed, 31 insertions(+), 16 deletions(-) (limited to 'src/corelib/doc') diff --git a/src/corelib/doc/snippets/code/doc_src_plugins-howto.pro b/src/corelib/doc/snippets/code/doc_src_plugins-howto.pro index 5eb9604ed7..dc75c1d9d7 100644 --- a/src/corelib/doc/snippets/code/doc_src_plugins-howto.pro +++ b/src/corelib/doc/snippets/code/doc_src_plugins-howto.pro @@ -43,7 +43,7 @@ CONFIG += release #! [3] #! [4] -CONFIG += qpa_minimal_plugin +QTPLUGIN.platforms = qminimal #! [4] #! [5] @@ -53,7 +53,7 @@ QTPLUGIN += qjpeg \ #! [5] #! [6] -CONFIG -= import_qpa_plugin +QTPLUGIN.platforms = - #! [6] #! [7] diff --git a/src/corelib/doc/src/plugins-howto.qdoc b/src/corelib/doc/src/plugins-howto.qdoc index 7fc4682fd4..7dc0d01cce 100644 --- a/src/corelib/doc/src/plugins-howto.qdoc +++ b/src/corelib/doc/src/plugins-howto.qdoc @@ -266,20 +266,46 @@ To link those plugins statically, you need to add the required plugins to your build using \c QTPLUGIN. - Q_IMPORT_PLUGIN() macros are also needed in application code, - but those are automatically generated by qmake and added to - your application project. In the \c .pro file for your application, you need the following entry: \snippet code/doc_src_plugins-howto.pro 5 + qmake automatically adds the plugins to QTPLUGIN that are typically + needed by the used Qt modules (see \c QT), while more specialized + plugins need to be added manually. + The default list of automatically added plugins can be overridden + per type. + For example, to link the minimal plugin instead of the default Qt + platform adaptation plugin, use: + + \snippet code/doc_src_plugins-howto.pro 4 + + If you want neither the default nor the minimal QPA plugin to be + linked automatically, use: + + \snippet code/doc_src_plugins-howto.pro 6 + + The defaults are tuned towards an optimal out-of-the-box experience, + but may unnecessarily bloat the application. + It is recommended to inspect the linker command line built by qmake + and eliminate unnecessary plugins. + + \section2 Details of Linking Static Plugins + + To cause static plugins actually being linked and instantiated, + Q_IMPORT_PLUGIN() macros are also needed in application code, + but those are automatically generated by qmake and added to + your application project. + If you do not want all plugins added to QTPLUGIN to be automatically linked, remove \c import_plugins from the \c CONFIG variable: \snippet code/doc_src_plugins-howto.pro 7 + \section2 Creating Static Plugins + It is also possible to create your own static plugins, by following these steps: @@ -298,17 +324,6 @@ to make sure that the \c{QT_STATICPLUGIN} preprocessor macro is defined. - The default Qt platform adaptation plugin is automatically added to QTPLUGIN - in static builds. If you want to add the minimal plugin instead, add \c qpa_minimal_plugin - to \c CONFIG: - - \snippet code/doc_src_plugins-howto.pro 4 - - If you want neither the default nor the minimal QPA plugin to be linked automatically, - remove \c import_qpa_plugin from \c CONFIG: - - \snippet code/doc_src_plugins-howto.pro 6 - \section1 Deploying and Debugging Plugins The \l{Deploying Plugins} document covers the process of deploying -- cgit v1.2.3