diff options
author | Friedemann Kleint <Friedemann.Kleint@nokia.com> | 2009-12-15 10:21:02 +0100 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@nokia.com> | 2009-12-15 10:21:02 +0100 |
commit | 119ea80735314fc416bc32a7503345eda0693e86 (patch) | |
tree | 4e37324077bbe22927ade9535c74197a11cfb6cd /src | |
parent | 397b634aee53d1f3ea46cea962a3a836c94dded2 (diff) |
Debugger: Ignore case of file name in breakpoint handling on Windows.
Task-number: QTCREATORBUG-438
Diffstat (limited to 'src')
-rw-r--r-- | src/plugins/debugger/breakhandler.cpp | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/src/plugins/debugger/breakhandler.cpp b/src/plugins/debugger/breakhandler.cpp index e0b397fcef..b207360bd7 100644 --- a/src/plugins/debugger/breakhandler.cpp +++ b/src/plugins/debugger/breakhandler.cpp @@ -49,6 +49,18 @@ using namespace Debugger::Internal; // ////////////////////////////////////////////////////////////////// +// Compare file names case insensitively on Windows. +static inline bool fileNameMatch(const QString &f1, const QString &f2) +{ + return f1.compare(f2, +#ifdef Q_OS_WIN + Qt::CaseInsensitive +#else + Qt::CaseSensitive +#endif + ) == 0; +} + namespace Debugger { namespace Internal { @@ -236,7 +248,7 @@ bool BreakpointData::isLocatedAt(const QString &fileName_, int lineNumber_) cons return true; return false; */ - return lineNumber_ == markerLineNumber && fileName_ == markerFileName; + return lineNumber_ == markerLineNumber && fileNameMatch(fileName_, markerFileName); } bool BreakpointData::conditionsMatch() const @@ -310,7 +322,7 @@ int BreakHandler::findBreakpoint(const BreakpointData &needle) return index; // at least at a position we were looking for // FIXME: breaks multiple breakpoints at the same location - if (data->fileName == needle.bpFileName + if (fileNameMatch(data->fileName, needle.bpFileName) && data->lineNumber == needle.bpLineNumber) return index; } |