diff options
author | Kai Koehne <kai.koehne@nokia.com> | 2011-04-26 09:18:49 +0200 |
---|---|---|
committer | con <qtc-committer@nokia.com> | 2011-04-26 09:40:33 +0200 |
commit | 444fd5ee191419af916bbc656583a38f38fdde14 (patch) | |
tree | 3bb0f77b68c2416969a3482c5ddd07e8e0f6202b | |
parent | a4c42ea4d9fafbefa84522ee7c7eaee5c430deab (diff) | |
download | qt-creator-444fd5ee191419af916bbc656583a38f38fdde14.tar.gz |
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
-rw-r--r-- | src/plugins/debugger/qml/qmlengine.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/plugins/debugger/qml/qmlengine.cpp b/src/plugins/debugger/qml/qmlengine.cpp index 72df4e46c9..8df56ad9b8 100644 --- a/src/plugins/debugger/qml/qmlengine.cpp +++ b/src/plugins/debugger/qml/qmlengine.cpp @@ -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); |