Analyzer: Rework the dock widget layout generation

Decouple layout generation from widget generation and
separate analyzer action description from menu action creation.

Tool specific layouts are named "Perspective" now.

Change-Id: I774efe77a07640c4cc26e4e566662c8a673c8831
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
This commit is contained in:
hjk
2016-02-26 14:14:49 +01:00
parent 04cbf8b818
commit 931ee3382c
32 changed files with 645 additions and 679 deletions

View File

@@ -45,6 +45,7 @@
#include <utils/checkablemessagebox.h>
#include <utils/fancymainwindow.h>
#include <QAction>
#include <QDockWidget>
#include <QHBoxLayout>
#include <QLabel>
@@ -103,11 +104,7 @@ QWidget *ClangStaticAnalyzerTool::createWidgets()
this, &ClangStaticAnalyzerTool::handleStateUpdate);
}
QDockWidget *issuesDock = AnalyzerManager::createDockWidget(ClangStaticAnalyzerToolId,
m_diagnosticView);
issuesDock->show();
Utils::FancyMainWindow *mw = AnalyzerManager::mainWindow();
mw->splitDockWidget(mw->toolBarDockWidget(), issuesDock, Qt::Vertical);
AnalyzerManager::createDockWidget(m_diagnosticView, ClangStaticAnalyzerDock);
//
// Toolbar widget
@@ -294,7 +291,7 @@ void ClangStaticAnalyzerTool::handleStateUpdate()
message += tr("%n issues found (%1 suppressed).", 0, issuesFound)
.arg(issuesFound - issuesVisible);
}
AnalyzerManager::showPermanentStatusMessage(ClangStaticAnalyzerToolId, message);
AnalyzerManager::showPermanentStatusMessage(ClangStaticAnalyzerPerspective, message);
}
} // namespace Internal