Debugger: Merge debug mode and analyze mode

On the user-visible side, only the 'Analyze' mode button disappears,
and instead a combobox to switch between different tools in appears
in the Debug mode toolbar.

Internally, that's quite some re-organzition: The centralized
'Analyze mode is busy' flag is gone, allowing us to run e.g.
ClangStaticAnalyzer and MemCheck in parallel.

Analyzer tools and debugger now share the same mechanism to
generate/load/save dock widgets.

Analyzer tools now create and handle their own start/stop button
when appropriate. In general, Analyzer tools can create/handle more
than one run control at a time.

Further consolidation is possible, e.g. RunControl state handling
could be merged into the base ProjectExplorer::RunControl to
avoid the still existing duplication in ~15 instances.

Change-Id: I91e5940ebc4211f98056d507cf2f7b5f8efe7f07
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
This commit is contained in:
hjk
2016-03-02 13:57:37 +01:00
parent c326011feb
commit 92e301a054
79 changed files with 2135 additions and 2642 deletions

View File

@@ -191,8 +191,8 @@ ErrorItem::ErrorItem(const ErrorListModelPrivate *modelPrivate, const Error &err
static QVariant location(const Frame &frame, int role)
{
switch (role) {
case Analyzer::DetailedErrorView::LocationRole:
return QVariant::fromValue(Analyzer::DiagnosticLocation(frame.filePath(), frame.line(), 0));
case Debugger::DetailedErrorView::LocationRole:
return QVariant::fromValue(Debugger::DiagnosticLocation(frame.filePath(), frame.line(), 0));
case Qt::ToolTipRole:
return frame.filePath().isEmpty() ? QVariant() : QVariant(frame.filePath());
default:
@@ -202,14 +202,14 @@ static QVariant location(const Frame &frame, int role)
QVariant ErrorItem::data(int column, int role) const
{
if (column == Analyzer::DetailedErrorView::LocationColumn) {
if (column == Debugger::DetailedErrorView::LocationColumn) {
const Frame frame = m_modelPrivate->findRelevantFrame(m_error);
return location(frame, role);
}
// DiagnosticColumn
switch (role) {
case Analyzer::DetailedErrorView::FullTextRole: {
case Debugger::DetailedErrorView::FullTextRole: {
QString content;
QTextStream stream(&content);
@@ -257,7 +257,7 @@ StackItem::StackItem(const Stack &stack) : m_stack(stack)
QVariant StackItem::data(int column, int role) const
{
const ErrorItem * const errorItem = getErrorItem();
if (column == Analyzer::DetailedErrorView::LocationColumn)
if (column == Debugger::DetailedErrorView::LocationColumn)
return location(errorItem->modelPrivate()->findRelevantFrame(errorItem->error()), role);
// DiagnosticColumn
@@ -285,7 +285,7 @@ FrameItem::FrameItem(const Frame &frame) : m_frame(frame)
QVariant FrameItem::data(int column, int role) const
{
if (column == Analyzer::DetailedErrorView::LocationColumn)
if (column == Debugger::DetailedErrorView::LocationColumn)
return location(m_frame, role);
// DiagnosticColumn

View File

@@ -45,7 +45,7 @@ class ErrorListModel : public Utils::TreeModel
public:
enum Role {
ErrorRole = Analyzer::DetailedErrorView::FullTextRole + 1,
ErrorRole = Debugger::DetailedErrorView::FullTextRole + 1,
};
class RelevantFrameFinder