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
This commit is contained in:
Kai Koehne
2011-04-26 09:18:49 +02:00
committed by con
parent a4c42ea4d9
commit 444fd5ee19

View File

@@ -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);