Commit 54a04e68 authored by Marco Benelli's avatar Marco Benelli Committed by Tim Jenssen

QmlJs: qmlplugindump working directory

Use the plugin's parent path as working directory for the qmlplugindump
process.  This should be more reliable with regards to paths that
include symbolic links to shared or remote volumes.
Using the plugin's parent path will also be needed in order to handle
relative paths passed to the dumper (ie: with the -dependencies
option). This feature is not yet implemented in QtCreator.

Change-Id: I9c863a95d03fc7d03c84e704e39f2e0520aaa01e
Reviewed-by: default avatarThomas Hartmann <>
Reviewed-by: Tim Jenssen's avatarTim Jenssen <>
parent 3ff007d5
......@@ -515,8 +515,12 @@ void PluginDumper::loadQmltypesFile(const QStringList &qmltypesFilePaths,
void PluginDumper::runQmlDump(const QmlJS::ModelManagerInterface::ProjectInfo &info,
const QStringList &arguments, const QString &importPath)
QDir wd = QDir(importPath);
QProcess *process = new QProcess(this);
QString workingDir = wd.canonicalPath();
connect(process, static_cast<void (QProcess::*)(int)>(&QProcess::finished),
this, &PluginDumper::qmlPluginTypeDumpDone);
connect(process, static_cast<void (QProcess::*)(QProcess::ProcessError)>(&QProcess::error),
......@@ -567,7 +571,7 @@ void PluginDumper::dump(const Plugin &plugin)
args << QLatin1String("-nonrelocatable");
args << plugin.importUri;
args << plugin.importVersion;
args << plugin.importPath;
args << (plugin.importPath.isEmpty() ? QLatin1String(".") : plugin.importPath);
runQmlDump(info, args, plugin.qmldirPath);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment