diff options
author | Kai Köhne <kai.koehne@qt.io> | 2021-03-09 13:16:04 +0100 |
---|---|---|
committer | Kai Koehne <kai.koehne@qt.io> | 2021-03-23 08:41:01 +0000 |
commit | 4f8474e5326ebb9d23d85141e416e82eb04cb160 (patch) | |
tree | 6e5365478b433f8aaf6eae50afffe89adca7d662 /src/plugins/qmljstools/qmljsmodelmanager.cpp | |
parent | bc518cf353afed9896a7ee0f66f65ff9f2730016 (diff) | |
download | qt-creator-4f8474e5326ebb9d23d85141e416e82eb04cb160.tar.gz |
Simplify handling of qmlplugindump
Much of it isn't needed anymore:
- we do not build a debug version of qmlplugindump anymore since Qt 5.0
- on mac, qmlplugindump is not an app bundle since Qt 5.1
- since commit 6871f31b4ec6, the env parameter was just passed through
So if we take out this and all the infrastructure around it,
qmlplugindump is just a tool that we can handle like all the other
tools.
Change-Id: Ifa583ce7052a9030858312ab7c2e20f7ebce4051
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@qt.io>
Diffstat (limited to 'src/plugins/qmljstools/qmljsmodelmanager.cpp')
-rw-r--r-- | src/plugins/qmljstools/qmljsmodelmanager.cpp | 22 |
1 files changed, 6 insertions, 16 deletions
diff --git a/src/plugins/qmljstools/qmljsmodelmanager.cpp b/src/plugins/qmljstools/qmljsmodelmanager.cpp index 56c974c07c..c41d55b996 100644 --- a/src/plugins/qmljstools/qmljsmodelmanager.cpp +++ b/src/plugins/qmljstools/qmljsmodelmanager.cpp @@ -49,7 +49,6 @@ #include <qmljs/qmljsbind.h> #include <qmljs/qmljsfindexportedcpptypes.h> #include <qmljs/qmljsplugindumper.h> -#include <qtsupport/qmldumptool.h> #include <qtsupport/qtkitinformation.h> #include <qtsupport/qtsupportconstants.h> #include <texteditor/textdocument.h> @@ -128,14 +127,10 @@ ModelManagerInterface::ProjectInfo ModelManager::defaultProjectInfoForProject( Kit *activeKit = activeTarget ? activeTarget->kit() : KitManager::defaultKit(); QtSupport::BaseQtVersion *qtVersion = QtSupport::QtKitAspect::qtVersion(activeKit); - bool preferDebugDump = false; - bool setPreferDump = false; projectInfo.tryQmlDump = false; if (activeTarget) { if (BuildConfiguration *bc = activeTarget->activeBuildConfiguration()) { - preferDebugDump = bc->buildType() == BuildConfiguration::Debug; - setPreferDump = true; // Append QML2_IMPORT_PATH if it is defined in build configuration. // It enables qmlplugindump to correctly dump custom plugins or other dependent // plugins that are not installed in default Qt qml installation directory. @@ -149,8 +144,6 @@ ModelManagerInterface::ProjectInfo ModelManager::defaultProjectInfoForProject( projectInfo.applicationDirectories.append(target.targetFilePath.parentDir().toString()); } } - if (!setPreferDump && qtVersion) - preferDebugDump = (qtVersion->defaultBuildConfig() & QtSupport::BaseQtVersion::DebugBuild); if (qtVersion && qtVersion->isValid()) { projectInfo.tryQmlDump = project && qtVersion->type() == QLatin1String(QtSupport::Constants::DESKTOPQT); projectInfo.qtQmlPath = qtVersion->qmlPath().toFileInfo().canonicalFilePath(); @@ -160,16 +153,13 @@ ModelManagerInterface::ProjectInfo ModelManager::defaultProjectInfoForProject( projectInfo.qtVersionString = QLatin1String(qVersion()); } - if (projectInfo.tryQmlDump) { - QtSupport::QmlDumpTool::pathAndEnvironment(activeKit, - preferDebugDump, &projectInfo.qmlDumpPath, - &projectInfo.qmlDumpEnvironment); - projectInfo.qmlDumpHasRelocatableFlag = qtVersion->hasQmlDumpWithRelocatableFlag(); - } else { - projectInfo.qmlDumpPath.clear(); - projectInfo.qmlDumpEnvironment.clear(); - projectInfo.qmlDumpHasRelocatableFlag = true; + projectInfo.qmlDumpPath.clear(); + const QtSupport::BaseQtVersion *version = QtSupport::QtKitAspect::qtVersion(activeKit); + if (version && projectInfo.tryQmlDump) { + projectInfo.qmlDumpPath = version->qmlplugindumpCommand(); + projectInfo.qmlDumpHasRelocatableFlag = version->hasQmlDumpWithRelocatableFlag(); } + setupProjectInfoQmlBundles(projectInfo); return projectInfo; } |