Commit eac940cd authored by Kai Koehne's avatar Kai Koehne
Browse files

QmlInspector: Fix mapping of file names to source dir on Mac

Qml Applications by default copy the qml files into in
the shadow build directory. Take this into account when trying to find the files in the source directory.

Reviewed-by: Alessandro Portale
parent 4f33fbc2
......@@ -566,6 +566,13 @@ QString InspectorUi::filenameForShadowBuildFile(const QString &filename) const
if (projectDir.exists() && buildDir.exists() && fileInfo.exists()) {
if (fileInfo.absoluteFilePath().startsWith(buildDir.canonicalPath())) {
QString fileRelativePath = fileInfo.canonicalFilePath().mid(debugProjectBuildDirectory().length());
#ifdef Q_OS_MACX
// Qt Quick Applications by default copy the qml directory to buildDir()/
static QRegExp resourceBundlePattern(QLatin1String("^.*\\.app/Contents/Resources/"));
QFileInfo projectFile(projectDir.canonicalPath() + QLatin1Char('/') + fileRelativePath);
if (projectFile.exists())
Supports Markdown
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