Debugger: make Location::fileName a Utils::FilePath

Change-Id: I637d39246ff576db1023f08c432a7f7b6aadbbaa
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
David Schulz
2020-01-02 12:37:57 +01:00
parent a7dd0e50a2
commit b23d80d537
9 changed files with 31 additions and 30 deletions

View File

@@ -106,7 +106,7 @@ bool FrameKey::matches(const Location &loc) const
{
return loc.address() >= startAddress
&& loc.address() <= endAddress
&& loc.fileName() == fileName
&& loc.fileName().toString() == fileName
&& loc.functionName() == functionName;
}
@@ -248,7 +248,7 @@ void DisassemblerAgent::setLocation(const Location &loc)
QString("Using cached disassembly for 0x%1 (0x%2-0x%3) in \"%4\"/ \"%5\"")
.arg(loc.address(), 0, 16)
.arg(key.startAddress, 0, 16).arg(key.endAddress, 0, 16)
.arg(loc.functionName(), QDir::toNativeSeparators(loc.fileName()));
.arg(loc.functionName(), loc.fileName().toUserOutput());
d->engine->showMessage(msg);
setContentsToDocument(d->cache.at(index).second);
d->resetLocationScheduled = false; // In case reset from previous run still pending.
@@ -295,7 +295,7 @@ void DisassemblerAgent::setContents(const DisassemblerLines &contents)
const quint64 endAddress = contents.endAddress();
if (startAddress) {
FrameKey key;
key.fileName = d->location.fileName();
key.fileName = d->location.fileName().toString();
key.functionName = d->location.functionName();
key.startAddress = startAddress;
key.endAddress = endAddress;
@@ -325,7 +325,7 @@ void DisassemblerAgent::setContentsToDocument(const DisassemblerLines &contents)
// Make that a proper TextDocument reimplementation.
d->document->setProperty(Debugger::Constants::OPENED_BY_DEBUGGER, true);
d->document->setProperty(Debugger::Constants::OPENED_WITH_DISASSEMBLY, true);
d->document->setProperty(Debugger::Constants::DISASSEMBLER_SOURCE_FILE, d->location.fileName());
d->document->setProperty(Debugger::Constants::DISASSEMBLER_SOURCE_FILE, d->location.fileName().toString());
d->configureMimeType();
} else {
EditorManager::activateEditorForDocument(d->document);