From a7dd0e50a28595eb976d77b1b23b8120b0a9395a Mon Sep 17 00:00:00 2001 From: David Schulz Date: Thu, 2 Jan 2020 11:31:14 +0100 Subject: Debugger: make BreakpointParameters::fileName a Utils::FilePath Task-number: QTCREATORBUG-23339 Change-Id: Ifc497c14589cd6df10d8219533e100f1919213b3 Reviewed-by: hjk --- src/plugins/debugger/breakpoint.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/plugins/debugger/breakpoint.cpp') diff --git a/src/plugins/debugger/breakpoint.cpp b/src/plugins/debugger/breakpoint.cpp index d6a05fafc0..673052bcd7 100644 --- a/src/plugins/debugger/breakpoint.cpp +++ b/src/plugins/debugger/breakpoint.cpp @@ -142,7 +142,7 @@ void BreakpointParameters::updateLocation(const QString &location) file = file.mid(1, file.size() - 2); QFileInfo fi(file); if (fi.isReadable()) - fileName = fi.absoluteFilePath(); + fileName = Utils::FilePath::fromFileInfo(fi); } } @@ -156,8 +156,9 @@ bool BreakpointParameters::isQmlFileAndLineBreakpoint() const qmlExtensionString = ".qml;.js"; const auto qmlFileExtensions = qmlExtensionString.splitRef(';', QString::SkipEmptyParts); + const QString file = fileName.toString(); for (const QStringRef &extension : qmlFileExtensions) { - if (fileName.endsWith(extension, Qt::CaseInsensitive)) + if (file.endsWith(extension, Qt::CaseInsensitive)) return true; } return false; @@ -377,7 +378,6 @@ void BreakpointParameters::updateFromGdbOutput(const GdbMi &bkpt) QString name; if (!fullName.isEmpty()) { name = cleanupFullName(fullName); - fileName = name; //if (data->markerFileName().isEmpty()) // data->setMarkerFileName(name); } else { @@ -386,7 +386,7 @@ void BreakpointParameters::updateFromGdbOutput(const GdbMi &bkpt) // gdb's own. No point in assigning markerFileName for now. } if (!name.isEmpty()) - fileName = name; + fileName = Utils::FilePath::fromString(name); if (fileName.isEmpty()) updateLocation(originalLocation); -- cgit v1.2.1