Commit 444fd5ee authored by Kai Koehne's avatar Kai Koehne Committed by con
Browse files

QmlDebug: Make sure that right file is opened when hitting breakpoint

Make the file search case insensitive on Windows, in case the projects
directory has a different capitalization than what we store in the user
settings.

Reviewed-by: Robert Loehning
parent a4c42ea4
......@@ -1029,7 +1029,11 @@ QString QmlEngine::mangleFilenamePaths(const QString &filename,
QFileInfo fileInfo(filename);
if (oldBaseDir.exists() && newBaseDir.exists() && fileInfo.exists()) {
if (fileInfo.absoluteFilePath().startsWith(oldBaseDir.canonicalPath())) {
Qt::CaseSensitivity caseSensitive = Qt::CaseSensitive;
#ifdef Q_OS_WIN
caseSensitive = Qt::CaseInsensitive;
#endif
if (fileInfo.absoluteFilePath().startsWith(oldBaseDir.canonicalPath(), caseSensitive)) {
QString fileRelativePath = fileInfo.canonicalFilePath().mid(oldBaseDir.canonicalPath().length());
QFileInfo projectFile(newBaseDir.canonicalPath() + QLatin1Char('/') + fileRelativePath);
......
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