mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-30 20:15:35 +08:00
Added isFromClass, see
https://dev.vatsim-germany.org/boards/22/topics/2207?r=2230#message-2230
This commit is contained in:
committed by
Roland Winklmeier
parent
8054022716
commit
09ecb419dd
@@ -88,6 +88,14 @@ namespace BlackMisc
|
||||
//! Info or debug, no warning or error
|
||||
bool isSeverityInfoOrLess() const { return this->m_severity == SeverityInfo || this->m_severity == SeverityDebug; }
|
||||
|
||||
//! Returns true if this message was sent by an instance of class T.
|
||||
template <class T>
|
||||
bool isFromClass(const T *pointer = nullptr) const
|
||||
{
|
||||
CLogCategoryList classCategories(pointer);
|
||||
return std::all_of(classCategories.begin(), classCategories.end(), [this](const CLogCategory & cat) { return m_categories.contains(cat); });
|
||||
}
|
||||
|
||||
//! Mark the message as having been handled by the given object
|
||||
void markAsHandledBy(const QObject *object) const;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user