Debugger: make BreakpointParameters::fileName a Utils::FilePath

Task-number: QTCREATORBUG-23339
Change-Id: Ifc497c14589cd6df10d8219533e100f1919213b3
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
David Schulz
2020-01-02 11:31:14 +01:00
parent 1291755288
commit a7dd0e50a2
14 changed files with 105 additions and 112 deletions

View File

@@ -879,7 +879,7 @@ void CdbEngine::executeJumpToLine(const ContextData &data)
// Jump to source line: Resolve source line address and go to that location
QString cmd;
StringInputStream str(cmd);
str << "? `" << QDir::toNativeSeparators(data.fileName) << ':' << data.lineNumber << '`';
str << "? `" << data.fileName.toUserOutput() << ':' << data.lineNumber << '`';
runCommand({cmd, BuiltinCommand, [this, data](const DebuggerResponse &r) {
handleJumpToLineAddressResolution(r, data); }});
}
@@ -916,7 +916,7 @@ void CdbEngine::handleJumpToLineAddressResolution(const DebuggerResponse &respon
const quint64 address = answer.toULongLong(&ok, 16);
if (ok && address) {
jumpToAddress(address);
gotoLocation(Location(context.fileName, context.lineNumber));
gotoLocation(Location(context.fileName.toString(), context.lineNumber));
}
}
@@ -2449,8 +2449,8 @@ void CdbEngine::insertBreakpoint(const Breakpoint &bp)
if (!m_autoBreakPointCorrection
&& parameters.type == BreakpointByFileAndLine
&& boolSetting(CdbBreakPointCorrection)) {
response.lineNumber = int(lineCorrection->fixLineNumber(
parameters.fileName, unsigned(parameters.lineNumber)));
response.lineNumber = int(lineCorrection->fixLineNumber(parameters.fileName.toString(),
unsigned(parameters.lineNumber)));
QString cmd = cdbAddBreakpointCommand(response, m_sourcePathMappings, responseId);
runCommand({cmd, BuiltinCommand, handleBreakInsertCB});
} else {