mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-04 00:16:51 +08:00
refs #506, utility function for status message
This commit is contained in:
committed by
Mathew Sutcliffe
parent
deed61a88c
commit
24bf0b940f
@@ -219,14 +219,19 @@ namespace BlackMisc
|
||||
return true;
|
||||
}
|
||||
|
||||
bool CStatusMessage::isSeverityHigherOrEqual(CStatusMessage::StatusSeverity severity) const
|
||||
{
|
||||
return this->getSeverity() >= severity;
|
||||
}
|
||||
|
||||
bool CStatusMessage::isSuccess() const
|
||||
{
|
||||
return !isFailure();
|
||||
return !this->isFailure();
|
||||
}
|
||||
|
||||
bool CStatusMessage::isFailure() const
|
||||
{
|
||||
return getSeverity() == SeverityError;
|
||||
return this->getSeverity() == SeverityError;
|
||||
}
|
||||
|
||||
void CStatusMessage::prependMessage(const QString &msg)
|
||||
|
||||
@@ -221,6 +221,9 @@ namespace BlackMisc
|
||||
//! Info or debug, no warning or error
|
||||
bool isSeverityInfoOrLess() const { return this->m_severity == SeverityInfo || this->m_severity == SeverityDebug; }
|
||||
|
||||
//! Is this message's severity higher or equal
|
||||
bool isSeverityHigherOrEqual(CStatusMessage::StatusSeverity severity) const;
|
||||
|
||||
//! Warning or above
|
||||
bool isWarningOrAbove() const { return this->m_severity == SeverityWarning || this->m_severity == SeverityError; }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user