diff options
author | Fawzi Mohamed <fawzi.mohamed@digia.com> | 2013-04-24 12:21:21 +0200 |
---|---|---|
committer | Fawzi Mohamed <fawzi.mohamed@digia.com> | 2013-04-25 17:21:45 +0200 |
commit | eac15b5e7d7c8ce61c70a2843384b41a820a2531 (patch) | |
tree | b23b64123bd9d6a7ab3a87386b1af64a54cb4130 /src/plugins | |
parent | e79377958991e14d504f17674496d90e202170a8 (diff) | |
download | qt-creator-eac15b5e7d7c8ce61c70a2843384b41a820a2531.tar.gz |
qmljs: add explicit -relocatable flag to qmlplugindumper and use it
This will allow changing the default to nonrelocatable.
Change-Id: I80746a3e70f94040a407cc25cec9ad6fac8b6fec
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
Diffstat (limited to 'src/plugins')
-rw-r--r-- | src/plugins/qmljstools/qmljsmodelmanager.cpp | 2 | ||||
-rw-r--r-- | src/plugins/qmljstools/qmljsplugindumper.cpp | 2 | ||||
-rw-r--r-- | src/plugins/qtsupport/baseqtversion.cpp | 7 | ||||
-rw-r--r-- | src/plugins/qtsupport/baseqtversion.h | 1 | ||||
-rw-r--r-- | src/plugins/qtsupport/qmldumptool.cpp | 1 |
5 files changed, 13 insertions, 0 deletions
diff --git a/src/plugins/qmljstools/qmljsmodelmanager.cpp b/src/plugins/qmljstools/qmljsmodelmanager.cpp index a97a944905..aa7ef5b550 100644 --- a/src/plugins/qmljstools/qmljsmodelmanager.cpp +++ b/src/plugins/qmljstools/qmljsmodelmanager.cpp @@ -135,9 +135,11 @@ ModelManagerInterface::ProjectInfo QmlJSTools::defaultProjectInfoForProject( toolChain, preferDebugDump, &projectInfo.qmlDumpPath, &projectInfo.qmlDumpEnvironment); + projectInfo.qmlDumpHasRelocatableFlag = qtVersion->hasQmlDumpWithRelocatableFlag(); } else { projectInfo.qmlDumpPath.clear(); projectInfo.qmlDumpEnvironment.clear(); + projectInfo.qmlDumpHasRelocatableFlag = true; } setupProjectInfoQmlBundles(projectInfo); return projectInfo; diff --git a/src/plugins/qmljstools/qmljsplugindumper.cpp b/src/plugins/qmljstools/qmljsplugindumper.cpp index 766024d981..771d60b266 100644 --- a/src/plugins/qmljstools/qmljsplugindumper.cpp +++ b/src/plugins/qmljstools/qmljsplugindumper.cpp @@ -433,6 +433,8 @@ void PluginDumper::dump(const Plugin &plugin) if (ComponentVersion(plugin.importVersion).isValid()) args << plugin.importVersion; } else { + if (info.qmlDumpHasRelocatableFlag) + args << QLatin1String("-relocatable"); args << plugin.importUri; args << plugin.importVersion; args << plugin.importPath; diff --git a/src/plugins/qtsupport/baseqtversion.cpp b/src/plugins/qtsupport/baseqtversion.cpp index 3c6e54794b..db214cc4a1 100644 --- a/src/plugins/qtsupport/baseqtversion.cpp +++ b/src/plugins/qtsupport/baseqtversion.cpp @@ -1097,6 +1097,13 @@ bool BaseQtVersion::hasQmlDump() const return m_hasQmlDump; } +bool BaseQtVersion::hasQmlDumpWithRelocatableFlag() const +{ + updateVersionInfo(); + return ((qtVersion() > QtVersionNumber(4, 8, 4) && qtVersion() < QtVersionNumber(5, 0, 0)) + || qtVersion() >= QtVersionNumber(5, 1, 0)); +} + bool BaseQtVersion::needsQmlDump() const { updateVersionInfo(); diff --git a/src/plugins/qtsupport/baseqtversion.h b/src/plugins/qtsupport/baseqtversion.h index 1789314727..a73f601dbc 100644 --- a/src/plugins/qtsupport/baseqtversion.h +++ b/src/plugins/qtsupport/baseqtversion.h @@ -200,6 +200,7 @@ public: virtual bool hasGdbDebuggingHelper() const; virtual bool hasQmlDump() const; + virtual bool hasQmlDumpWithRelocatableFlag() const; virtual bool needsQmlDump() const; virtual bool hasQmlDebuggingLibrary() const; virtual bool needsQmlDebuggingLibrary() const; diff --git a/src/plugins/qtsupport/qmldumptool.cpp b/src/plugins/qtsupport/qmldumptool.cpp index 9921878e73..fe1535275d 100644 --- a/src/plugins/qtsupport/qmldumptool.cpp +++ b/src/plugins/qtsupport/qmldumptool.cpp @@ -137,6 +137,7 @@ private slots: if (projectInfo.qmlDumpPath.isEmpty()) projectInfo.qmlDumpPath = version->qmlDumpTool(!update.preferDebug); projectInfo.qmlDumpEnvironment = version->qmlToolsEnvironment(); + projectInfo.qmlDumpHasRelocatableFlag = version->hasQmlDumpWithRelocatableFlag(); modelManager->updateProjectInfo(projectInfo); } |