aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/corelib/api
diff options
context:
space:
mode:
authorJake Petroules <jake.petroules@qt.io>2017-05-12 18:50:50 -0700
committerJake Petroules <jake.petroules@qt.io>2017-06-13 15:47:18 +0000
commit8b5e5af31e7c0860f8cf4f8fa50e7b322cadca62 (patch)
tree36a7e2fc38c7571cdf7e4c6b6449754e39cb993c /src/lib/corelib/api
parentd5dc7a2571027168d1a74cbb2578848dc843e20e (diff)
Transform the scanner plugin manager into a true generic plugin manager
...and fit the generator plugins into this new plugin structure. Plugins are now handled entirely by the build system in a generic manner and no part of qbscore (code or build files) has a direct reference to any plugin regardless of whether qbs is being built as shared or static libraries. Change-Id: I4a20546ce275df71083ee22c2cb67f781c4de764 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Diffstat (limited to 'src/lib/corelib/api')
-rw-r--r--src/lib/corelib/api/project.cpp15
1 files changed, 4 insertions, 11 deletions
diff --git a/src/lib/corelib/api/project.cpp b/src/lib/corelib/api/project.cpp
index fba895e2f..f06a0126e 100644
--- a/src/lib/corelib/api/project.cpp
+++ b/src/lib/corelib/api/project.cpp
@@ -71,7 +71,7 @@
#include <tools/installoptions.h>
#include <tools/preferences.h>
#include <tools/processresult.h>
-#include <tools/scannerpluginmanager.h>
+#include <tools/qbspluginmanager.h>
#include <tools/scripttools.h>
#include <tools/setupprojectparameters.h>
#include <tools/qbsassert.h>
@@ -83,11 +83,6 @@
#include <mutex>
-#ifdef QBS_STATIC_LIB
-extern "C" ScannerPlugin *cppScanners[];
-extern "C" ScannerPlugin *qtScanners[];
-#endif
-
namespace qbs {
namespace Internal {
@@ -111,11 +106,9 @@ static void loadPlugins(const QStringList &_pluginPaths, const Logger &logger)
pluginPaths << pluginPath;
}
}
- ScannerPluginManager::instance()->loadPlugins(pluginPaths, logger);
-#ifdef QBS_STATIC_LIB
- ScannerPluginManager::instance()->loadPlugins(cppScanners);
- ScannerPluginManager::instance()->loadPlugins(qtScanners);
-#endif
+ auto pluginManager = QbsPluginManager::instance();
+ pluginManager->loadStaticPlugins();
+ pluginManager->loadPlugins(pluginPaths, logger);
qRegisterMetaType<ErrorInfo>("qbs::ErrorInfo");
qRegisterMetaType<ProcessResult>("qbs::ProcessResult");