File indexing completed on 2024-05-12 05:52:34

0001 /*
0002     SPDX-FileCopyrightText: 2016-2024 Laurent Montel <montel@kde.org>
0003 
0004     SPDX-License-Identifier: LGPL-2.0-or-later
0005 
0006 */
0007 
0008 #include "kdeloggingcategory.h"
0009 
0010 KdeLoggingCategory::KdeLoggingCategory() = default;
0011 
0012 bool KdeLoggingCategory::operator==(const KdeLoggingCategory &other) const
0013 {
0014     return (description == other.description) && (categoryName == other.categoryName) && (defaultSeverity == other.defaultSeverity)
0015         && (identifierName == other.identifierName);
0016 }
0017 
0018 bool KdeLoggingCategory::operator!=(const KdeLoggingCategory &other) const
0019 {
0020     return !operator==(other);
0021 }
0022 
0023 bool KdeLoggingCategory::isValid() const
0024 {
0025     return !categoryName.isEmpty();
0026 }
0027 
0028 QDebug operator<<(QDebug d, const KdeLoggingCategory &cat)
0029 {
0030     d << "description: " << cat.description;
0031     d << "logname: " << cat.categoryName;
0032     d << "default category: " << cat.defaultSeverity;
0033     d << "identifier: " << cat.identifierName;
0034     return d;
0035 }