File indexing completed on 2024-05-12 05:22:32
0001 /* 0002 * This file is part of LibKGAPI library 0003 * 0004 * SPDX-FileCopyrightText: 2013 Daniel Vrátil <dvratil@redhat.com> 0005 * 0006 * SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL 0007 */ 0008 0009 #include "tasklist.h" 0010 #include "debug.h" 0011 0012 using namespace KGAPI2; 0013 0014 class Q_DECL_HIDDEN TaskList::Private 0015 { 0016 public: 0017 Private() = default; 0018 Private(const Private &other) = default; 0019 0020 QString title; 0021 QString selfLink; 0022 QString updated; 0023 QString uid; 0024 }; 0025 0026 TaskList::TaskList() 0027 : Object() 0028 , d(new Private) 0029 { 0030 } 0031 0032 TaskList::TaskList(const TaskList &other) 0033 : Object(other) 0034 , d(new Private(*(other.d.get()))) 0035 { 0036 } 0037 0038 TaskList::~TaskList() = default; 0039 0040 bool TaskList::operator==(const TaskList &other) const 0041 { 0042 if (!Object::operator==(other)) { 0043 return false; 0044 } 0045 0046 if (d->uid != other.d->uid) { 0047 qCDebug(KGAPIDebug) << "UIDs don't match"; 0048 return false; 0049 } 0050 0051 if (d->title != other.d->title) { 0052 qCDebug(KGAPIDebug) << "Titles don't match"; 0053 return false; 0054 } 0055 0056 return true; 0057 } 0058 0059 void TaskList::setUid(const QString &uid) 0060 { 0061 d->uid = uid; 0062 } 0063 0064 QString TaskList::uid() const 0065 { 0066 return d->uid; 0067 } 0068 0069 void TaskList::setTitle(const QString &title) 0070 { 0071 d->title = title; 0072 } 0073 0074 QString TaskList::title() const 0075 { 0076 return d->title; 0077 } 0078 0079 void TaskList::setSelfLink(const QString &selfLink) 0080 { 0081 d->selfLink = selfLink; 0082 } 0083 0084 QString TaskList::selfLink() const 0085 { 0086 return d->selfLink; 0087 } 0088 0089 void TaskList::setUpdated(const QString &updated) 0090 { 0091 d->updated = updated; 0092 } 0093 0094 QString TaskList::updated() const 0095 { 0096 return d->updated; 0097 }