File indexing completed on 2024-12-22 05:01:08

0001 /*
0002     SPDX-FileCopyrightText: 2023-2024 Laurent Montel <montel.org>
0003     SPDX-License-Identifier: GPL-2.0-only
0004 */
0005 
0006 #include "historyclosedreaderinfo.h"
0007 
0008 HistoryClosedReaderInfo::HistoryClosedReaderInfo() = default;
0009 
0010 HistoryClosedReaderInfo::~HistoryClosedReaderInfo() = default;
0011 
0012 QString HistoryClosedReaderInfo::subject() const
0013 {
0014     return mSubject;
0015 }
0016 
0017 void HistoryClosedReaderInfo::setSubject(const QString &newSubject)
0018 {
0019     mSubject = newSubject;
0020 }
0021 
0022 Akonadi::Item::Id HistoryClosedReaderInfo::item() const
0023 {
0024     return mItem;
0025 }
0026 
0027 void HistoryClosedReaderInfo::setItem(Akonadi::Item::Id newItem)
0028 {
0029     mItem = newItem;
0030 }
0031 
0032 bool HistoryClosedReaderInfo::isValid() const
0033 {
0034     return mItem != -1;
0035 }
0036 
0037 bool HistoryClosedReaderInfo::operator==(const HistoryClosedReaderInfo &other) const
0038 {
0039     return other.item() == mItem && other.subject() == mSubject;
0040 }
0041 
0042 QDebug operator<<(QDebug d, const HistoryClosedReaderInfo &t)
0043 {
0044     d << " mSubject " << t.subject();
0045     d << " mItem " << t.item();
0046     return d;
0047 }