Commit 7bc1af27 authored by Daniel Teske's avatar Daniel Teske

Debugger/Android: Add the Qt's qml directory as a search path

Change-Id: I5244eda989220aa2e2f8a225294d3c1dd0d97a2a
Task-number: QTCREATORBUG-13245
Reviewed-by: default avatarhjk <hjk@theqtcompany.com>
Reviewed-by: default avatarDaniel Teske <daniel.teske@theqtcompany.com>
parent 77070f59
......@@ -116,6 +116,12 @@ RunControl *AndroidDebugSupport::createDebugRunControl(AndroidRunConfiguration *
params.remoteSetupNeeded = true;
//TODO: Not sure if these are the right paths.
params.projectSourceDirectory = target->project()->projectDirectory().toString();
Kit *kit = target->kit();
QtSupport::BaseQtVersion *version = QtSupport::QtKitInformation::qtVersion(kit);
if (version) {
const QString qmlQtDir = version->versionInfo().value(QLatin1String("QT_INSTALL_QML"));
params.additionalSearchDirectories = QStringList(qmlQtDir);
}
params.projectSourceFiles = target->project()->files(Project::ExcludeGeneratedFiles);
params.projectBuildDirectory = target->activeBuildConfiguration()->buildDirectory().toString();
}
......
......@@ -1310,6 +1310,7 @@ QString DebuggerEngine::toFileInProject(const QUrl &fileUrl)
const DebuggerStartParameters &sp = startParameters();
d->m_fileFinder.setProjectDirectory(sp.projectSourceDirectory);
d->m_fileFinder.setProjectFiles(sp.projectSourceFiles);
d->m_fileFinder.setAdditionalSearchDirectories(sp.additionalSearchDirectories);
d->m_fileFinder.setSysroot(sp.sysRoot);
return d->m_fileFinder.findFile(fileUrl);
......
......@@ -2307,6 +2307,8 @@ static QString formatStartParameters(DebuggerStartParameters &sp)
str << " (built: " << QDir::toNativeSeparators(sp.projectBuildDirectory)
<< ')';
str << '\n';
str << "Addtional Search Directories:"
<< sp.additionalSearchDirectories.join(QLatin1Char(' ')) << '\n';
}
if (!sp.qmlServerAddress.isEmpty())
str << "QML server: " << sp.qmlServerAddress << ':'
......
......@@ -127,6 +127,7 @@ public:
QString qmlServerAddress;
quint16 qmlServerPort;
QString projectSourceDirectory;
QStringList additionalSearchDirectories;
QString projectBuildDirectory;
QStringList projectSourceFiles;
......
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