Commit 51012b11 authored by hjk's avatar hjk
Browse files

Debugger: Pinned LLDB tooltip stepping with out-of-source builds



Previously it "released" on step as the scope paths from the code
model and the debugger report "differed" ("a/b/../c" vs "a/c")

Change-Id: Ida094581cfaa53b00f9186495870854ca431f041
Reviewed-by: default avatarChristian Stenger <christian.stenger@theqtcompany.com>
parent 7066e334
......@@ -52,6 +52,7 @@
#include <QClipboard>
#include <QDebug>
#include <QDesktopWidget>
#include <QFileInfo>
#include <QLabel>
#include <QScrollBar>
#include <QSortFilterProxyModel>
......@@ -772,15 +773,22 @@ DebuggerToolTipContext::DebuggerToolTipContext()
{
}
static bool filesMatch(const QString &file1, const QString &file2)
{
QFileInfo f1(file1);
QFileInfo f2(file2);
return f1.canonicalFilePath() == f2.canonicalFilePath();
}
bool DebuggerToolTipContext::matchesFrame(const QString &frameFile, const QString &frameFunction) const
{
return (fileName.isEmpty() || frameFile.isEmpty() || fileName == frameFile)
return (fileName.isEmpty() || frameFile.isEmpty() || filesMatch(fileName, frameFile))
&& (function.isEmpty() || frameFunction.isEmpty() || function == frameFunction);
}
bool DebuggerToolTipContext::isSame(const DebuggerToolTipContext &other) const
{
return fileName == other.fileName
return filesMatch(fileName, other.fileName)
&& function == other.function
&& iname == other.iname;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment