From 76e1a06c449d4c4ae3fabfe5fc91019d59615577 Mon Sep 17 00:00:00 2001 From: Klaus Basan Date: Sun, 11 Jun 2017 21:33:23 +0200 Subject: [PATCH] Ref T82, allow to sort by severity --- src/blackmisc/statusmessagelist.cpp | 5 +++++ src/blackmisc/statusmessagelist.h | 3 +++ 2 files changed, 8 insertions(+) diff --git a/src/blackmisc/statusmessagelist.cpp b/src/blackmisc/statusmessagelist.cpp index aa6e5825b..4e1296284 100644 --- a/src/blackmisc/statusmessagelist.cpp +++ b/src/blackmisc/statusmessagelist.cpp @@ -120,6 +120,11 @@ namespace BlackMisc } } + void CStatusMessageList::sortBySeverity() + { + this->sortBy(&CStatusMessage::getSeverity); + } + void CStatusMessageList::removeWarningsAndBelow() { if (this->isEmpty()) { return; } diff --git a/src/blackmisc/statusmessagelist.h b/src/blackmisc/statusmessagelist.h index 5519db9f3..c4e2d4ad4 100644 --- a/src/blackmisc/statusmessagelist.h +++ b/src/blackmisc/statusmessagelist.h @@ -88,6 +88,9 @@ namespace BlackMisc //! And higher (more critical) severity will be clipped to given severity void clampSeverity(CStatusMessage::StatusSeverity severity); + //! Sort by severity, lowest first + void sortBySeverity(); + //! Remove warnings and below void removeWarningsAndBelow();