8#include "itemchangelog_p.h"
12ItemChangeLog *ItemChangeLog::sInstance =
nullptr;
14ItemChangeLog *ItemChangeLog::instance()
17 sInstance =
new ItemChangeLog;
22ItemChangeLog::ItemChangeLog()
26Item::Flags &ItemChangeLog::addedFlags(ItemPrivate *priv)
28 return m_addedFlags[priv];
31Item::Flags ItemChangeLog::addedFlags(
const ItemPrivate *priv)
const
33 return m_addedFlags[
const_cast<ItemPrivate *
>(priv)];
36Item::Flags &ItemChangeLog::deletedFlags(ItemPrivate *priv)
38 return m_deletedFlags[priv];
41Item::Flags ItemChangeLog::deletedFlags(
const ItemPrivate *priv)
const
43 return m_deletedFlags[
const_cast<ItemPrivate *
>(priv)];
46Tag::List &ItemChangeLog::addedTags(ItemPrivate *priv)
48 return m_addedTags[priv];
51Tag::List ItemChangeLog::addedTags(
const ItemPrivate *priv)
const
53 return m_addedTags[
const_cast<ItemPrivate *
>(priv)];
56Tag::List &ItemChangeLog::deletedTags(ItemPrivate *priv)
58 return m_deletedTags[priv];
61Tag::List ItemChangeLog::deletedTags(
const ItemPrivate *priv)
const
63 return m_deletedTags[
const_cast<ItemPrivate *
>(priv)];
66AttributeStorage &ItemChangeLog::attributeStorage(ItemPrivate *priv)
68 return m_attributeStorage[priv];
71AttributeStorage ItemChangeLog::attributeStorage(
const ItemPrivate *priv)
const
73 return m_attributeStorage[
const_cast<ItemPrivate *
>(priv)];
76void ItemChangeLog::removeItem(
const ItemPrivate *priv)
78 auto p =
const_cast<ItemPrivate *
>(priv);
80 m_deletedFlags.remove(p);
81 m_addedTags.remove(p);
82 m_deletedTags.remove(p);
83 m_attributeStorage.remove(p);
86void ItemChangeLog::clearItemChangelog(
const ItemPrivate *priv)
88 auto p =
const_cast<ItemPrivate *
>(priv);
89 m_addedFlags.remove(p);
90 m_deletedFlags.remove(p);
91 m_addedTags.remove(p);
92 m_deletedTags.remove(p);
93 m_attributeStorage[p].resetChangeLog();
Helper integration between Akonadi and Qt.
void remove(qsizetype i, qsizetype n)
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 4 2024 16:31:58 by
doxygen 1.12.0 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.