Merge remote-tracking branch 'origin/4.11'

Change-Id: I66389d88d5a60c6c86547b93cca945af42aa807b
This commit is contained in:
Eike Ziller
2019-10-28 11:48:31 +01:00
103 changed files with 1888 additions and 468 deletions

View File

@@ -169,31 +169,24 @@ public:
// running, as this can be triggered by moving the breakpoint to
// the next line that generated code.
m_gbp->m_params.lineNumber = lineNumber;
m_gbp->updateMarker();
m_gbp->update();
m_gbp->updateLineNumber(lineNumber);
}
void updateFileName(const FilePath &fileName) final
{
TextMark::updateFileName(fileName);
QTC_ASSERT(m_gbp, return);
m_gbp->m_params.fileName = fileName.toString();
m_gbp->update();
m_gbp->updateFileName(fileName);
}
bool isDraggable() const final { return true; }
void dragToLine(int line) final
{
TextMark::move(line);
QTC_ASSERT(m_gbp, return);
QTC_ASSERT(BreakpointManager::globalBreakpoints().contains(m_gbp), return);
BreakpointParameters params = m_gbp->m_params;
params.lineNumber = line;
GlobalBreakpoint gbp = m_gbp;
m_gbp = GlobalBreakpoint();
gbp->deleteBreakpoint();
m_gbp = BreakpointManager::createBreakpoint(params);
m_gbp->updateLineNumber(line);
}
bool isClickable() const final { return true; }
@@ -2273,6 +2266,23 @@ void GlobalBreakpointItem::removeBreakpointFromModel()
theBreakpointManager->destroyItem(this);
}
void GlobalBreakpointItem::updateLineNumber(int lineNumber)
{
if (m_params.lineNumber == lineNumber)
return;
m_params.lineNumber = lineNumber;
update();
}
void GlobalBreakpointItem::updateFileName(const FilePath &fileName)
{
const QString &file = fileName.toString();
if (m_params.fileName == file)
return;
m_params.fileName = file;
update();
}
QString GlobalBreakpointItem::markerFileName() const
{
// Some heuristics to find a "good" file name.
@@ -2308,11 +2318,14 @@ void GlobalBreakpointItem::updateMarker()
const FilePath file = FilePath::fromString(m_params.fileName);
const int line = m_params.lineNumber;
if (m_marker && (file != m_marker->fileName() || line != m_marker->lineNumber()))
destroyMarker();
if (!m_marker && !file.isEmpty() && line > 0)
if (m_marker) {
if (file != m_marker->fileName())
m_marker->updateFileName(file);
if (line != m_marker->lineNumber())
m_marker->move(line);
} else if (!file.isEmpty() && line > 0) {
m_marker = new GlobalBreakpointMarker(this, file, line);
}
if (m_marker)
m_marker->setToolTip(toolTip());

View File

@@ -93,7 +93,6 @@ private:
friend class BreakHandler;
friend class BreakpointManager;
friend class BreakpointMarker;
friend class GlobalBreakpointMarker;
void updateMarker();
void updateMarkerIcon();

View File

@@ -131,6 +131,7 @@ class DebuggerMainWindowPrivate : public QObject
{
public:
DebuggerMainWindowPrivate(DebuggerMainWindow *parent);
~DebuggerMainWindowPrivate();
void selectPerspective(Perspective *perspective);
void depopulateCurrentPerspective();
@@ -256,6 +257,11 @@ DebuggerMainWindowPrivate::DebuggerMainWindowPrivate(DebuggerMainWindow *parent)
});
}
DebuggerMainWindowPrivate::~DebuggerMainWindowPrivate()
{
delete m_editorPlaceHolder;
}
DebuggerMainWindow::DebuggerMainWindow()
: d(new DebuggerMainWindowPrivate(this))
{

View File

@@ -215,6 +215,14 @@ DebuggerRunConfigurationAspect::DebuggerRunConfigurationAspect(Target *target)
m_overrideStartupAspect->setLabelText(tr("Additional startup commands:"));
}
DebuggerRunConfigurationAspect::~DebuggerRunConfigurationAspect()
{
delete m_cppAspect;
delete m_qmlAspect;
delete m_multiProcessAspect;
delete m_overrideStartupAspect;
}
void DebuggerRunConfigurationAspect::setUseQmlDebugger(bool value)
{
m_qmlAspect->setValue(value);

View File

@@ -42,6 +42,7 @@ class DEBUGGER_EXPORT DebuggerRunConfigurationAspect
public:
DebuggerRunConfigurationAspect(ProjectExplorer::Target *target);
~DebuggerRunConfigurationAspect();
void fromMap(const QVariantMap &map) override;
void toMap(QVariantMap &map) const override;