Skip to content
Snippets Groups Projects
Commit 119ea807 authored by Friedemann Kleint's avatar Friedemann Kleint
Browse files

Debugger: Ignore case of file name in breakpoint handling on Windows.

Task-number: QTCREATORBUG-438
parent 397b634a
No related branches found
No related tags found
No related merge requests found
...@@ -49,6 +49,18 @@ using namespace Debugger::Internal; ...@@ -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 Debugger {
namespace Internal { namespace Internal {
...@@ -236,7 +248,7 @@ bool BreakpointData::isLocatedAt(const QString &fileName_, int lineNumber_) cons ...@@ -236,7 +248,7 @@ bool BreakpointData::isLocatedAt(const QString &fileName_, int lineNumber_) cons
return true; return true;
return false; return false;
*/ */
return lineNumber_ == markerLineNumber && fileName_ == markerFileName; return lineNumber_ == markerLineNumber && fileNameMatch(fileName_, markerFileName);
} }
bool BreakpointData::conditionsMatch() const bool BreakpointData::conditionsMatch() const
...@@ -310,7 +322,7 @@ int BreakHandler::findBreakpoint(const BreakpointData &needle) ...@@ -310,7 +322,7 @@ int BreakHandler::findBreakpoint(const BreakpointData &needle)
return index; return index;
// at least at a position we were looking for // at least at a position we were looking for
// FIXME: breaks multiple breakpoints at the same location // FIXME: breaks multiple breakpoints at the same location
if (data->fileName == needle.bpFileName if (fileNameMatch(data->fileName, needle.bpFileName)
&& data->lineNumber == needle.bpLineNumber) && data->lineNumber == needle.bpLineNumber)
return index; return index;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment