KBookmarks
kbookmarkmanager.cpp
119 topLevel.setAttribute(QStringLiteral("xmlns:mime"), QStringLiteral("http://www.freedesktop.org/standards/shared-mime-info"));
120 topLevel.setAttribute(QStringLiteral("xmlns:bookmark"), QStringLiteral("http://www.freedesktop.org/standards/desktop-bookmarks"));
121 topLevel.setAttribute(QStringLiteral("xmlns:kdepriv"), QStringLiteral("http://www.kde.org/kdepriv"));
123 doc.insertBefore(doc.createProcessingInstruction(QStringLiteral("xml"), Strings::piData()), topLevel);
143 QObject::connect(KDirWatch::self(), &KDirWatch::dirty, this, &KBookmarkManager::slotFileChanged);
144 QObject::connect(KDirWatch::self(), &KDirWatch::created, this, &KBookmarkManager::slotFileChanged);
145 QObject::connect(KDirWatch::self(), &KDirWatch::deleted, this, &KBookmarkManager::slotFileChanged);
190 qCWarning(KBOOKMARKS_LOG) << "KBookmarkManager::parse : main tag is missing, creating default " << d->m_bookmarksFile;
299 if (d->m_toolbarDoc.isNull() && QFile::exists(cacheFilename) && bmInfo.lastModified() < cacheInfo.lastModified()) {
367 (void)save(); // KDE5 TODO: emitChanged should return a bool? Maybe rename it to saveAndEmitChanged?
KBookmark next(const KBookmark ¤t) const
Return the next sibling of a child bookmark of this group.
Definition kbookmark.cpp:129
This class implements the reading/writing of bookmarks in XML.
Definition kbookmarkmanager.h:48
KBookmark findByAddress(const QString &address)
Definition kbookmarkmanager.cpp:329
QDomDocument internalDocument() const
Definition kbookmarkmanager.cpp:166
bool updateAccessMetadata(const QString &url)
Update access time stamps for a given url.
Definition kbookmarkmanager.cpp:376
KBookmarkGroup toolbar()
This returns the root of the toolbar menu.
Definition kbookmarkmanager.cpp:290
bool save(bool toolbarCache=true) const
Save the bookmarks to an XML file on disk.
Definition kbookmarkmanager.cpp:217
QString path() const
This will return the path that this manager is using to read the bookmarks.
Definition kbookmarkmanager.cpp:280
bool saveAs(const QString &filename, bool toolbarCache=true) const
Save the bookmarks to the given XML file on disk.
Definition kbookmarkmanager.cpp:222
void changed(const QString &groupAddress)
Signals that the group (or any of its children) with the address groupAddress (e.g.
KBookmarkManager(const QString &bookmarksFile, QObject *parent=nullptr)
Create a KBookmarkManager responsible for the given bookmarksFile.
Definition kbookmarkmanager.cpp:127
bool isGroup() const
Whether the bookmark is a group or a normal bookmark.
Definition kbookmark.cpp:285
KBookmarkGroup toGroup() const
Convert this to a group - do this only if isGroup() returns true.
Definition kbookmark.cpp:471
QString address() const
Return the "address" of this bookmark in the whole tree.
Definition kbookmark.cpp:477
void addFile(const QString &file)
void removeFile(const QString &file)
static KDirWatch * self()
void deleted(const QString &path)
void dirty(const QString &path)
void created(const QString &path)
bool simpleBackupFile(const QString &filename, const QString &backupDir=QString(), const QString &backupExtension=QStringLiteral("~"))
char * data()
qsizetype length() const const
bool mkpath(const QString &dirPath) const const
QDomElement createElement(const QString &tagName)
QDomProcessingInstruction createProcessingInstruction(const QString &target, const QString &data)
QString toString(int indent) const const
QString attribute(const QString &name, const QString &defValue) const const
void setAttribute(const QString &name, const QString &value)
QString tagName() const const
QDomNode appendChild(const QDomNode &newChild)
QDomNode insertBefore(const QDomNode &newChild, const QDomNode &refChild)
bool isNull() const const
bool isProcessingInstruction() const const
QDomNode parentNode() const const
QDomNode removeChild(const QDomNode &oldChild)
QDomProcessingInstruction toProcessingInstruction() const const
bool exists() const const
bool open(FILE *fh, OpenMode mode, FileHandleFlags handleFlags)
bool remove()
FileError error() const const
QString absolutePath() const const
QDateTime lastModified() const const
QString errorString() const const
qint64 write(const QByteArray &data)
ReadOnly
iterator begin()
iterator end()
bool isEmpty() const const
Q_EMITQ_EMIT
QMetaObject::Connection connect(const QObject *sender, PointerToMemberFunction signal, Functor functor)
QString tr(const char *sourceText, const char *disambiguation, int n)
bool commit()
virtual QString fileName() const const override
virtual bool open(OpenMode mode) override
QString arg(Args &&... args) const const
bool isEmpty() const const
uint toUInt(bool *ok, int base) const const
QByteArray toUtf8() const const
SkipEmptyParts
void flush()
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:10:11 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:10:11 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.