ClangTools: Move checkbox from view's header to toolbar

Avoid the following issues with the diagnostic view's header:
* Clicking on the header to reverse the sorting is somewhat pointless as
  there is only one column.
* It takes vertical space.
* The checkbox to select/unselect all fixits for application is hacky,
  not drawn nicely on Windows and macOS and its position is somewhat
  problematic as on hover the dock widgets handles are popping up.
* To check the check box, one needs to click within the check box
  rectangle, which is a pretty small area of the screen.

Instead, add a proper checkbox with a label to the toolbar (apparently
this needs some adaptions to our ManhattenStyle). By positioning it
before the "Apply Fixits" button, we can streamline the work flow.

Change-Id: I4ff40c3641487428feb1cd8305470dc5219d048c
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
This commit is contained in:
Nikolai Kosjar
2019-10-24 14:52:18 +02:00
parent dcb35676df
commit 4d09e77719
6 changed files with 140 additions and 124 deletions

View File

@@ -56,6 +56,7 @@ class ClangToolsDiagnosticModel;
class Diagnostic;
class DiagnosticFilterModel;
class RunSettings;
class SelectFixitsCheckBox;
const char ClangTidyClazyPerspectiveId[] = "ClangTidyClazy.Perspective";
@@ -127,6 +128,7 @@ private:
DiagnosticFilterModel *m_diagnosticFilterModel = nullptr;
Utils::FancyLineEdit *m_filterLineEdit = nullptr;
SelectFixitsCheckBox *m_selectFixitsCheckBox = nullptr;
QToolButton *m_applyFixitsButton = nullptr;
QAction *m_openProjectSettings = nullptr;