예제 #1
0
inline bool qCompare(const Akonadi::Tag &left, const Akonadi::Tag &right,
                     const char *actual, const char *expected,
                     const char *file, int line)
{
    return zCompareHelper((left == right) && (left.name() == right.name()),
                          left, right, actual, expected, file, line);
}
예제 #2
0
void Serializer::updateTagFromAkonadiTag(Domain::Tag::Ptr tag, Akonadi::Tag akonadiTag)
{
    if (!isAkonadiTag(akonadiTag))
        return;

    tag->setProperty("tagId", akonadiTag.id());
    tag->setName(akonadiTag.name());
}
예제 #3
0
void Serializer::updateContextFromTag(Domain::Context::Ptr context, Akonadi::Tag tag)
{
    if (!isContext(tag))
        return;

    context->setProperty("tagId", tag.id());
    context->setName(tag.name());
}
예제 #4
0
QByteArray EwsTagStore::serializeTag(const Akonadi::Tag &tag) const
{
    QByteArray tagData;
    QDataStream stream(&tagData, QIODevice::WriteOnly);

    stream.setVersion(TagDataVer1StreamVer);
    stream << TagDataVer1;
    stream << tag.name() << tag.gid();
    Attribute::List attrs = tag.attributes();
    stream << (int)attrs.size();

    Q_FOREACH(const Attribute *attr, attrs) {
        stream << attr->type();
        stream << attr->serialized();
    }