File indexing completed on 2024-06-16 04:50:18
0001 /* 0002 SPDX-FileCopyrightText: 2014 Christian Mollekopf <mollekopf@kolabsys.com> 0003 SPDX-FileCopyrightText: 2015 Daniel Vrátil <dvratil@redhat.com> 0004 0005 SPDX-License-Identifier: LGPL-2.0-or-later 0006 */ 0007 0008 #pragma once 0009 0010 #include "attributestorage_p.h" 0011 #include "tag.h" 0012 0013 namespace Akonadi 0014 { 0015 class TagPrivate : public QSharedData 0016 { 0017 public: 0018 explicit TagPrivate() = default; 0019 TagPrivate(const TagPrivate &other) 0020 : QSharedData(other) 0021 , id(other.id) 0022 , gid(other.gid) 0023 , remoteId(other.remoteId) 0024 , type(other.type) 0025 , mAttributeStorage(other.mAttributeStorage) 0026 { 0027 if (other.parent) { 0028 parent.reset(new Tag(*other.parent)); 0029 } 0030 } 0031 0032 ~TagPrivate() = default; 0033 0034 void resetChangeLog() 0035 { 0036 mAttributeStorage.resetChangeLog(); 0037 } 0038 0039 // 4 bytes padding here (after QSharedData) 0040 0041 Tag::Id id = -1; 0042 QByteArray gid; 0043 QByteArray remoteId; 0044 QScopedPointer<Tag> parent; 0045 QByteArray type; 0046 AttributeStorage mAttributeStorage; 0047 }; 0048 0049 }