KBookmarks
kbookmarkmanager.cpp
191 for (KBookmarkManagerList::ConstIterator bmit = s_pSelf()->constBegin(), bmend = s_pSelf()->constEnd(); bmit != bmend; ++bmit) {
199 KBookmarkManager *KBookmarkManager::managerForFile(const QString &bookmarksFile, const QString &dbusObjectName)
254 topLevel.setAttribute(QStringLiteral("xmlns:mime"), QStringLiteral("http://www.freedesktop.org/standards/shared-mime-info"));
255 topLevel.setAttribute(QStringLiteral("xmlns:bookmark"), QStringLiteral("http://www.freedesktop.org/standards/desktop-bookmarks"));
256 topLevel.setAttribute(QStringLiteral("xmlns:kdepriv"), QStringLiteral("http://www.kde.org/kdepriv"));
258 doc.insertBefore(doc.createProcessingInstruction(QStringLiteral("xml"), Strings::piData()), topLevel);
326 if (dbusPath != QLatin1String("/KBookmarkManager/") && dbusPath != QLatin1String("/KBookmarkManager/generated")) {
337 .connect(QString(), dbusPath, Strings::bookmarkChangeNotifyInterface(), QStringLiteral("bookmarkConfigChanged"), this, SLOT(notifyConfigChanged()));
355 if (d->m_dialogAllowed && qobject_cast<QApplication *>(qApp) && QThread::currentThread() == qApp->thread()) {
423 qCWarning(KBOOKMARKS_LOG) << "KBookmarkManager::parse : main tag is missing, creating default " << d->m_bookmarksFile;
510 if (d->m_dialogAllowed && qobject_cast<QApplication *>(qApp) && QThread::currentThread() == qApp->thread()) {
515 << QStringLiteral("Unable to save bookmarks in %1. File reported the following error-code: %2.").arg(filename).arg(file.error());
541 if (d->m_toolbarDoc.isNull() && QFile::exists(cacheFilename) && bmInfo.lastModified() < cacheInfo.lastModified()) {
609 (void)save(); // KDE5 TODO: emitChanged should return a bool? Maybe rename it to saveAndEmitChanged?
612 // qCDebug(KBOOKMARKS_LOG) << "KBookmarkManager::emitChanged : broadcasting change " << group.address();
649 void KBookmarkManager::notifyChanged(const QString &groupAddress, const QDBusMessage &msg) // DBUS call
737 QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation) + QLatin1String("/konqueror/bookmarks.xml");
738 KBookmarkManager *bookmarkManager = KBookmarkManager::managerForFile(bookmarksFile, QStringLiteral("konqueror"));
bool connect(const QString &service, const QString &path, const QString &interface, const QString &name, QObject *receiver, const char *slot)
QString toString(int indent) const const
bool isNull() const const
KBookmark findByAddress(const QString &address)
Definition: kbookmarkmanager.cpp:571
QString errorString() const const
bool autoErrorHandlingEnabled() const
Check whether auto error handling is enabled.
Definition: kbookmarkmanager.cpp:383
static KBookmarkManager * managerForExternalFile(const QString &bookmarksFile)
Returns a KBookmarkManager, which will use QFileSystemWatcher for change detection This is important ...
Definition: kbookmarkmanager.cpp:221
QDomProcessingInstruction createProcessingInstruction(const QString &target, const QString &data)
bool isProcessingInstruction() const const
QDomProcessingInstruction toProcessingInstruction() const const
ReadOnly
NoGlobals
bool remove()
Q_EMITQ_EMIT
QString tagName() const const
QDomNode parentNode() const const
virtual bool open(QIODevice::OpenMode mode) override
Definition: kbookmark.h:27
void clear()
void emitChanged()
Saves the bookmark file and notifies everyone.
Definition: kbookmarkmanager.cpp:602
QDomNode removeChild(const QDomNode &oldChild)
bool isNull() const const
QDomDocument internalDocument() const
Definition: kbookmarkmanager.cpp:399
void changed(const QString &groupAddress, const QString &caller)
Signals that the group (or any of its children) with the address groupAddress (e.g.
KBookmarkGroup toolbar()
This returns the root of the toolbar menu.
Definition: kbookmarkmanager.cpp:532
bool commit()
static KBookmarkManager * userBookmarksManager()
Returns a pointer to the user's main (konqueror) bookmark collection.
Definition: kbookmarkmanager.cpp:734
QWidget * activeWindow()
QString writableLocation(QStandardPaths::StandardLocation type)
bool registerObject(const QString &path, QObject *object, QDBusConnection::RegisterOptions options)
QMessageBox::StandardButton warning(QWidget *parent, const QString &title, const QString &text, QMessageBox::StandardButtons buttons, QMessageBox::StandardButton defaultButton)
QDomElement createElement(const QString &tagName)
QString caption()
virtual bool open(QIODevice::OpenMode mode) override
bool exists() const const
QMetaObject::Connection connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
QThread * thread() const const
QString baseService() const const
QString address() const
Return the "address" of this bookmark in the whole tree.
Definition: kbookmark.cpp:479
Q_GLOBAL_STATIC(Internal::StaticControl, s_instance) class ControlPrivate
QString findExecutable(const QString &executableName, const QStringList &paths)
void setAttribute(const QString &name, const QString &value)
QString path() const
This will return the path that this manager is using to read the bookmarks.
Definition: kbookmarkmanager.cpp:522
virtual QString fileName() const const override
void flush()
bool saveAs(const QString &filename, bool toolbarCache=true) const
Save the bookmarks to the given XML file on disk.
Definition: kbookmarkmanager.cpp:462
QAction * copy(const QObject *recvr, const char *slot, QObject *parent)
applicationDisplayName
void notifyCompleteChange(const QString &caller)
Reparse the whole bookmarks file and notify about the change Doesn't send signal over D-Bus to the ot...
Definition: kbookmarkmanager.cpp:625
KBookmark next(const KBookmark ¤t) const
Return the next sibling of a child bookmark of this group.
Definition: kbookmark.cpp:131
QDBusConnection sessionBus()
KBookmarkGroup toGroup() const
Convert this to a group - do this only if isGroup() returns true.
Definition: kbookmark.cpp:473
SkipEmptyParts
bool isEmpty() const const
QByteArray toUtf8() const const
void setAutoErrorHandlingEnabled(bool enable, QWidget *parent)
Enable or disable auto error handling is enabled.
Definition: kbookmarkmanager.cpp:388
QTextCodec * codecForName(const QByteArray &name)
bool mkpath(const QString &dirPath) const const
QThread * currentThread()
bool isEmpty() const const
PostalAddress address(const QVariant &location)
QDomNode insertBefore(const QDomNode &newChild, const QDomNode &refChild)
KSharedConfigPtr config()
bool save(bool toolbarCache=true) const
Save the bookmarks to an XML file on disk.
Definition: kbookmarkmanager.cpp:457
QAction * find(const QObject *recvr, const char *slot, QObject *parent)
applicationName
uint toUInt(bool *ok, int base) const const
QString absolutePath() const const
bool startDetached(qint64 *pid)
GenericDataLocation
QString arg(qlonglong a, int fieldWidth, int base, QChar fillChar) const const
QDomNode appendChild(const QDomNode &newChild)
QFileDevice::FileError error() const const
void dirty(const QString &path)
static KBookmarkManager * managerForFile(const QString &bookmarksFile, const QString &dbusObjectName)
This static function will return an instance of the KBookmarkManager, responsible for the given bookm...
Definition: kbookmarkmanager.cpp:199
void update(Part *part, const QByteArray &data, qint64 dataSize)
void deleted(const QString &path)
void clear()
QList::iterator begin()
Definition: kbookmarkmanager.h:51
QString service() const const
bool simpleBackupFile(const QString &filename, const QString &backupDir=QString(), const QString &backupExtension=QStringLiteral("~"))
void created(const QString &path)
int length() const const
bool isGroup() const
Whether the bookmark is a group or a normal bookmark.
Definition: kbookmark.cpp:287
QString attribute(const QString &name, const QString &defValue) const const
void setEditorOptions(const QString &caption, bool browser)
Set options with which slotEditBookmarks called keditbookmarks this can be used to change the appeara...
Definition: kbookmarkmanager.cpp:669
QDateTime lastModified() const const
QList::iterator end()
bool updateAccessMetadata(const QString &url)
Update access time stamps for a given url.
Definition: kbookmarkmanager.cpp:708
QString tr(const char *sourceText, const char *disambiguation, int n)
void notifyChanged(const QString &groupAddress, const QDBusMessage &msg)
Emit the changed signal for the group whose address is given.
Definition: kbookmarkmanager.cpp:649
void setCodec(QTextCodec *codec)
QMessageBox::StandardButton critical(QWidget *parent, const QString &title, const QString &text, QMessageBox::StandardButtons buttons, QMessageBox::StandardButton defaultButton)
static KBookmarkManager * createTempManager()
only used for KBookmarkBar
Definition: kbookmarkmanager.cpp:244
QObject * parent() const const
void bookmarksChanged(QString groupAddress)
Signal send over D-Bus.
char * data()
qint64 write(const char *data, qint64 maxSize)
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon Dec 11 2023 03:57:16 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon Dec 11 2023 03:57:16 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.