File indexing completed on 2024-07-14 03:59:06

0001 /*
0002     This file is part of the syndication library
0003     SPDX-FileCopyrightText: 2006 Frank Osterfeld <osterfeld@kde.org>
0004 
0005     SPDX-License-Identifier: LGPL-2.0-or-later
0006 */
0007 
0008 #include "person.h"
0009 
0010 namespace Syndication
0011 {
0012 Person::~Person()
0013 {
0014 }
0015 
0016 QString Person::debugInfo() const
0017 {
0018     QString info = QLatin1String("# Person begin ####################\n");
0019 
0020     QString dname = name();
0021 
0022     if (!dname.isNull()) {
0023         info += QLatin1String("name: #") + dname + QLatin1String("#\n");
0024     }
0025 
0026     QString duri = uri();
0027 
0028     if (!duri.isNull()) {
0029         info += QLatin1String("uri: #") + duri + QLatin1String("#\n");
0030     }
0031 
0032     QString demail = email();
0033 
0034     if (!demail.isNull()) {
0035         info += QLatin1String("email: #") + demail + QLatin1String("#\n");
0036     }
0037 
0038     info += QLatin1String("# Person end ######################\n");
0039 
0040     return info;
0041 }
0042 
0043 bool Person::operator==(const Person &other) const
0044 {
0045     return name() == other.name() && email() == other.email() && uri() == other.uri();
0046 }
0047 
0048 } // namespace Syndication