/* Copyright (C) 2013 * swift project Community / Contributors * * This file is part of swift project. It is subject to the license terms in the LICENSE file found in the top-level * directory of this distribution and at http://www.swift-project.org/license.html. No part of swift project, * including this file, may be copied, modified, propagated, or distributed except according to the terms * contained in the LICENSE file. */ #include "statusmessagelist.h" #include "statusmessage.h" namespace BlackMisc { /* * Construct from base class object */ CStatusMessageList::CStatusMessageList(const CSequence &other) : CSequence(other) { } /* * Messages by type */ CStatusMessageList CStatusMessageList::findByCategory(const CLogCategory &category) const { return this->findBy([ & ](const CStatusMessage &msg) { return msg.getCategories().contains(category); }); } /* * Messages by severity */ CStatusMessageList CStatusMessageList::findBySeverity(CStatusMessage::StatusSeverity severity) const { return this->findBy(&CStatusMessage::getSeverity, severity); } /* * Metadata */ void CStatusMessageList::registerMetadata() { qRegisterMetaType>(); qDBusRegisterMetaType>(); qRegisterMetaType>(); qDBusRegisterMetaType>(); qRegisterMetaType(); qDBusRegisterMetaType(); } }