diff options
author | David Schulz <david.schulz@qt.io> | 2020-01-02 11:31:14 +0100 |
---|---|---|
committer | David Schulz <david.schulz@qt.io> | 2020-01-06 13:29:44 +0000 |
commit | a7dd0e50a28595eb976d77b1b23b8120b0a9395a (patch) | |
tree | c40150044b4b57f7e1feae0502fcd73b8e2ffacb /src/plugins/debugger/breakpoint.cpp | |
parent | 1291755288ca11ba548cd3467dbe5b81496c541d (diff) | |
download | qt-creator-a7dd0e50a28595eb976d77b1b23b8120b0a9395a.tar.gz |
Debugger: make BreakpointParameters::fileName a Utils::FilePath
Task-number: QTCREATORBUG-23339
Change-Id: Ifc497c14589cd6df10d8219533e100f1919213b3
Reviewed-by: hjk <hjk@qt.io>
Diffstat (limited to 'src/plugins/debugger/breakpoint.cpp')
-rw-r--r-- | src/plugins/debugger/breakpoint.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
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); |