summaryrefslogtreecommitdiffstats
path: root/src/corelib/doc/snippets
diff options
context:
space:
mode:
authorMiikka Heikkinen <miikka.heikkinen@digia.com>2012-12-11 16:02:45 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2012-12-11 16:08:10 +0100
commitd4d2e4b39d1162a45f372a02cce662754424d8cc (patch)
tree3369bee85ac469cffe6bb4ca159c029277ad4952 /src/corelib/doc/snippets
parent143352396051ee34a4eba1f0db8f1fe63366f95f (diff)
Automatically import plugins in all applications with static Qt
Since all gui applications already need some QPA plugin added, we might as well add the default plugin and generate the code to import the plugins automatically. User can opt out from the automation by removing relevant items from CONFIG variable: link_qpa_plugin or import_plugins. Task-number: QTBUG-28131 Change-Id: Ic171c363464c099143374d3e39bcc28f6edf73d2 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Diffstat (limited to 'src/corelib/doc/snippets')
-rw-r--r--src/corelib/doc/snippets/code/doc_src_plugins-howto.cpp17
-rw-r--r--src/corelib/doc/snippets/code/doc_src_plugins-howto.pro10
2 files changed, 9 insertions, 18 deletions
diff --git a/src/corelib/doc/snippets/code/doc_src_plugins-howto.cpp b/src/corelib/doc/snippets/code/doc_src_plugins-howto.cpp
index ca6e64a90e..a86441c822 100644
--- a/src/corelib/doc/snippets/code/doc_src_plugins-howto.cpp
+++ b/src/corelib/doc/snippets/code/doc_src_plugins-howto.cpp
@@ -65,20 +65,3 @@ QStyle *MyStylePlugin::create(const QString &key)
//! [2]
QApplication::setStyle(QStyleFactory::create("MyStyle"));
//! [2]
-
-
-//! [4]
-#include <QApplication>
-#include <QtPlugin>
-
-Q_IMPORT_PLUGIN(qjpeg)
-Q_IMPORT_PLUGIN(qgif)
-Q_IMPORT_PLUGIN(qkrcodecs)
-
-int main(int argc, char *argv[])
-{
- QApplication app(argc, argv);
- ...
- return app.exec();
-}
-//! [4]
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 2b20811377..b33db7942f 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_default_plugin import_plugins
+CONFIG += qpa_minimal_plugin
#! [4]
#! [5]
@@ -51,3 +51,11 @@ QTPLUGIN += qjpeg \
qgif \
qkrcodecs
#! [5]
+
+#! [6]
+CONFIG -= import_qpa_plugin
+#! [6]
+
+#! [7]
+CONFIG -= import_plugins
+#! [7]