redo QT_PLUGIN_PATH assembly for non-installed execution
authorOswald Buddenhagen <oswald.buddenhagen@digia.com>
Thu, 20 Sep 2012 10:53:33 +0000 (12:53 +0200)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Mon, 29 Oct 2012 21:21:32 +0000 (22:21 +0100)
it is a bad idea to extract plugin paths from library modules.
instead, just collect plugin paths from all known repositories.

Change-Id: I527325f20e9cf98ae974997530af1b2893537e5d
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
mkspecs/features/qt_functions.prf
mkspecs/features/qt_module_fwdpri.prf

index 1d24ed9..f8922e6 100644 (file)
@@ -210,12 +210,10 @@ defineTest(qtAddToolEnv) {
 defineTest(qtAddTargetEnv) {
     deps = $$resolve_depends(QT, "QT.")
     !isEmpty(deps) {
-        plugin_paths =
         for(dep, deps) {
             deppath += $$shell_path($$eval(QT.$${dep}.libs))
             for(rpath, QT.$${dep}.rpath_link): \
                 deppath += $$shell_path($$rpath)
-            plugin_paths += $$eval(QT.$${dep}.plugin_path) $$eval(QT.$${dep}.plugins)
         }
         equals(QMAKE_HOST.os, Windows): \
             deppath.name = PATH
@@ -227,12 +225,14 @@ defineTest(qtAddTargetEnv) {
             error("Operating system not supported.")
         deppath.value = $$unique(deppath)
         deppath.CONFIG = prepend
-        pluginpath.name = QT_PLUGIN_PATH
+
         pluginpath.value =
-        plugin_paths = $$unique(plugin_paths)
-        for(ppath, plugin_paths): \
-            exists($$ppath): \
-                pluginpath.value += $$shell_path($$ppath)
+        for(qmod, QMAKEMODULES) {
+            qmod = $$section(qmod, /, 0, -3)/plugins
+            exists($$qmod): pluginpath.value += $$shell_path($$qmod)
+        }
+        pluginpath.name = QT_PLUGIN_PATH
+
         QT_TOOL_ENV += deppath pluginpath
     }
     qtAddToolEnv($$1, $$QT_TOOL_ENV)
index 5dc63eb..9a0fd36 100644 (file)
     privqt = $$replace(QT_PRIVATE, -private$, )
     privdep = $$resolve_depends(privqt, "QT.")
     rpaths =
-    pluginpath =
     alldep = $$pubdep $$privdep
     for(dep, alldep) {   # Inherit link-rpaths from all our dependencies
         rpaths += $$eval(QT.$${dep}.rpath_link) $$eval(QT.$${dep}.rpath_link_private)
-        pluginpath += $$eval(QT.$${dep}.plugin_path) $$eval(QT.$${dep}.plugins)
     }
     privdep -= $$pubdep
     for(dep, privdep): \   # Add our private dependencies' lib paths as new link-rpaths
@@ -58,7 +56,6 @@
     } else {
         module_rpathlink_priv =
     }
-    pluginpath = $$unique(pluginpath)
 
     # Create a forwarding module .pri file
     MODULE_FWD_PRI_CONT = \
@@ -71,7 +68,6 @@
         $$module_rpathlink \
         $$module_rpathlink_priv \
         "QT.$${MODULE}.rpath = $$MODULE_INSTALL_LIBS" \
-        "QT.$${MODULE}.plugin_path = $$val_escape(pluginpath)" \
         "include($$MODULE_PRI)"
     write_file($$MODULE_FWD_PRI, MODULE_FWD_PRI_CONT)|error("Aborting.")
     touch($$MODULE_FWD_PRI, $$MODULE_PRI)