Akonadi
xmldocument.cpp
55static QDomElement findElementByRidHelper(const QDomElement &elem, const QString &rid, const QString &elemName)
147 xsdFile.isEmpty() ? QStandardPaths::locate(QStandardPaths::GenericDataLocation, QStringLiteral("kf6/akonadi/akonadi-xml.xsd")) : xsdFile;
148 const XmlPtr<xmlDocPtr, xmlFreeDoc> schemaDoc(xmlReadFile(schemaFileName.toLocal8Bit().constData(), nullptr, XML_PARSE_NONET));
153 XmlPtr<xmlSchemaParserCtxtPtr, xmlSchemaFreeParserCtxt> parserContext(xmlSchemaNewDocParserCtxt(schemaDoc));
163 const XmlPtr<xmlSchemaValidCtxtPtr, xmlSchemaFreeValidCtxt> validationContext(xmlSchemaNewValidCtxt(schema));
223 if (collection.parentCollection().remoteId().isEmpty() && collection.parentCollection() != Collection::root()) {
void setParentCollection(const Collection &parent)
Set the parent collection of this object.
Definition collection.cpp:204
Collection parentCollection() const
Returns the parent collection of this object.
Definition collection.cpp:195
bool loadFile(const QString &fileName, const QString &xsdFile={})
Parses the given XML file and validates it.
Definition xmldocument.cpp:115
QDomDocument & document() const
Returns the DOM document for this XML document.
Definition xmldocument.cpp:210
Collection collectionByRemoteId(const QString &rid) const
Returns the collection with the given remote id.
Definition xmldocument.cpp:253
Item::List items(const Collection &collection, bool includePayload=true) const
Returns the items in the given collection.
Definition xmldocument.cpp:298
bool isValid() const
Returns true if the document could be parsed successfully.
Definition xmldocument.cpp:200
QDomElement itemElementByRemoteId(const QString &rid) const
Returns the DOM element representing the item with the given remote id.
Definition xmldocument.cpp:243
Item itemByRemoteId(const QString &rid, bool includePayload=true) const
Returns the item with the given remote id.
Definition xmldocument.cpp:259
Collection::List childCollections(const Collection &parentCollection) const
Returns the immediate child collections of parentCollection.
Definition xmldocument.cpp:274
QDomElement collectionElementByRemoteId(const QString &rid) const
Returns the DOM element representing the collection with the given remote id.
Definition xmldocument.cpp:248
Collection::List collections() const
Returns the collections defined in this document.
Definition xmldocument.cpp:264
bool writeToFile(const QString &fileName) const
Writes the current document into the given file.
Definition xmldocument.cpp:186
QDomElement collectionElement(const Collection &collection) const
Returns the DOM element representing collection.
Definition xmldocument.cpp:215
QString lastError() const
Returns the last error occurred during file loading/parsing.
Definition xmldocument.cpp:205
QString i18n(const char *text, const TYPE &arg...)
AKONADI_XML_EXPORT Item elementToItem(const QDomElement &elem, bool includePayload=true)
Converts an item element.
Definition xmlreader.cpp:136
AKONADI_XML_EXPORT Collection elementToCollection(const QDomElement &elem)
Converts a collection element.
Definition xmlreader.cpp:53
AKONADI_XML_EXPORT Collection::List readCollections(const QDomElement &elem)
Reads recursively all collections starting from the given DOM element.
Definition xmlreader.cpp:73
AKONADI_XML_EXPORT Tag::List readTags(const QDomElement &elem)
Reads recursively all tags starting from the given DOM element.
Definition xmlreader.cpp:116
Helper integration between Akonadi and Qt.
const char * constData() const const
qsizetype length() const const
QDomElement documentElement() const const
QString attribute(const QString &name, const QString &defValue) const const
QString tagName() const const
QDomNodeList childNodes() const const
bool isNull() const const
QDomElement toElement() const const
QDomNode at(int index) const const
int count() const const
bool exists(const QString &fileName)
bool open(FILE *fh, OpenMode mode, FileHandleFlags handleFlags)
QString errorString() const const
QByteArray readAll()
qint64 write(const QByteArray &data)
ReadOnly
void append(QList< T > &&value)
GenericDataLocation
QString locate(StandardLocation type, const QString &fileName, LocateOptions options)
bool isEmpty() const const
QByteArray toLocal8Bit() const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Dec 27 2024 11:48:58 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Dec 27 2024 11:48:58 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.