KIO
kbookmarkmanager.cc
Go to the documentation of this file.
141 for ( KBookmarkManagerList::ConstIterator bmit = s_pSelf->constBegin(), bmend = s_pSelf->constEnd();
150 KBookmarkManager* KBookmarkManager::managerForFile( const QString& bookmarksFile, const QString& dbusObjectName )
209 topLevel.setAttribute("xmlns:bookmark", "http://www.freedesktop.org/standards/desktop-bookmarks");
216 KBookmarkManager::KBookmarkManager( const QString & bookmarksFile, const QString & dbusObjectName)
359 kWarning() << "KBookmarkManager::parse : main tag is missing, creating default " << d->m_bookmarksFile;
453 if (d->m_dialogAllowed && qApp->type() != QApplication::Tty && QThread::currentThread() == qApp->thread())
456 kError() << QString("Unable to save bookmarks in %1. File reported the following error-code: %2.").arg(filename).arg(file.error());
557 (void) save(); // KDE5 TODO: emitChanged should return a bool? Maybe rename it to saveAndEmitChanged?
595 void KBookmarkManager::notifyChanged( const QString &groupAddress, const QDBusMessage &msg ) // DBUS call
675 const QString bookmarksFile = KStandardDirs::locateLocal("data", QString::fromLatin1("konqueror/bookmarks.xml"));
676 KBookmarkManager* bookmarkManager = KBookmarkManager::managerForFile( bookmarksFile, "konqueror" );
QString caption()
QString i18n(const char *text)
bool save(bool toolbarCache=true) const
Save the bookmarks to an XML file on disk.
Definition: kbookmarkmanager.cc:396
static QDomElement createXbelTopLevelElement(QDomDocument &doc)
Definition: kbookmarkmanager.cc:205
void addFile(const QString &file)
KBookmarkGroup toGroup() const
Convert this to a group - do this only if isGroup() returns true.
Definition: kbookmark.cc:465
void updateFavicon(const QString &url, const QString &faviconurl)
Definition: kbookmarkmanager.cc:660
group
void setAutoErrorHandlingEnabled(bool enable, QWidget *parent)
Enable or disable auto error handling is enabled.
Definition: kbookmarkmanager.cc:322
QString fileName() const
KAction * saveAs(const QObject *recvr, const char *slot, QObject *parent)
#define K_GLOBAL_STATIC(TYPE, NAME)
virtual bool open(OpenMode flags=QIODevice::ReadWrite)
static QDebug kError(bool cond, int area=KDE_DEFAULT_DEBUG_AREA)
void slotEditBookmarksAtAddress(const QString &address)
Definition: kbookmarkmanager.cc:631
This class implements the reading/writing of bookmarks in XML.
Definition: kbookmarkmanager.h:65
void abort()
static QDebug kDebug(bool cond, int area=KDE_DEFAULT_DEBUG_AREA)
Definition: kbookmark.h:34
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.cc:150
KSharedConfigPtr config()
QFile::FileError error() const
static KBookmarkManager * createTempManager()
only used for KBookmarkBar
Definition: kbookmarkmanager.cc:196
NoGlobals
void setEditorOptions(const QString &caption, bool browser)
Set options with which slotEditBookmarks called keditbookmarks this can be used to change the appeara...
Definition: kbookmarkmanager.cc:612
bool updateAccessMetadata(const QString &url)
Update access time stamps for a given url.
Definition: kbookmarkmanager.cc:646
QString address() const
Return the "address" of this bookmark in the whole tree.
Definition: kbookmark.cc:471
void notifyChanged(const QString &groupAddress, const QDBusMessage &msg)
Emit the changed signal for the group whose address is given.
Definition: kbookmarkmanager.cc:595
static KBookmarkManager * managerForExternalFile(const QString &bookmarksFile)
Returns a KBookmarkManager, which will use KDirWatch for change detection This is important when shar...
Definition: kbookmarkmanager.cc:172
Definition: kbookmarkmenu_p.h:84
KBookmarkGroup toolbar()
This returns the root of the toolbar menu.
Definition: kbookmarkmanager.cc:473
virtual KBookmarkDialog * bookmarkDialog(KBookmarkManager *mgr, QWidget *parent)
Definition: kbookmarkmanager.cc:716
static KBookmarkManager * userBookmarksManager()
Returns a pointer to the user's main (konqueror) bookmark collection.
Definition: kbookmarkmanager.cc:673
virtual void openFolderinTabs(const KBookmarkGroup &bm)
Called if the user wants to open every bookmark in this folder in a new tab.
Definition: kbookmarkmanager.cc:721
bool autoErrorHandlingEnabled() const
Check whether auto error handling is enabled.
Definition: kbookmarkmanager.cc:317
static int find(const QByteArray &buf, int begin, const char c1)
returns the position of the first occurrence of any of the given characters c1 or comma ('...
Definition: dataprotocol.cpp:85
bool finalize()
KBookmark findByAddress(const QString &address)
Definition: kbookmarkmanager.cc:519
void emitChanged()
Saves the bookmark file and notifies everyone.
Definition: kbookmarkmanager.cc:549
T readEntry(const QString &key, const T &aDefault) const
static QString locateLocal(const char *type, const QString &filename, const KComponentData &cData=KGlobal::mainComponent())
QDomDocument internalDocument() const
Definition: kbookmarkmanager.cc:333
void notifyCompleteChange(const QString &caller)
Reparse the whole bookmarks file and notify about the change Doesn't send signal over DBUS to the oth...
Definition: kbookmarkmanager.cc:573
virtual bool enableOption(BookmarkOption option) const
Returns true if action should be shown in the menu The default is to show both a add and editBookmark...
Definition: kbookmarkmanager.cc:707
#define BOOKMARK_CHANGE_NOTIFY_INTERFACE
Definition: kbookmarkmanager.cc:47
QString path() const
This will return the path that this manager is using to read the bookmarks.
Definition: kbookmarkmanager.cc:463
static QDebug kWarning(bool cond, int area=KDE_DEFAULT_DEBUG_AREA)
bool isGroup() const
Whether the bookmark is a group or a normal bookmark.
Definition: kbookmark.cc:283
static KBookmarkManager * lookupExisting(const QString &bookmarksFile)
Definition: kbookmarkmanager.cc:139
KAction * save(const QObject *recvr, const char *slot, QObject *parent)
const KShortcut & end()
static bool simpleBackupFile(const QString &filename, const QString &backupDir=QString(), const QString &backupExtension=QLatin1String("~"))
QList< Action > parse(QSettings &ini)
bool saveAs(const QString &filename, bool toolbarCache=true) const
Save the bookmarks to the given XML file on disk.
Definition: kbookmarkmanager.cc:401
QString errorString() const
This class provides a Dialog for editing properties, adding Bookmarks and creating new folders...
Definition: kbookmarkdialog.h:44
Definition: kbookmark.h:459
static void error(QWidget *parent, const QString &text, const QString &caption=QString(), Options options=Notify)
Definition: netaccess.h:36
QString number(KIO::filesize_t size)
Converts a size to a string representation Not unlike QString::number(...)
Definition: global.cpp:63
const KShortcut & begin()
QStringList list(const QString &fileClass)
Returns a list of directories associated with this file-class.
Definition: krecentdirs.cpp:60
This file is part of the KDE documentation.
Documentation copyright © 1996-2017 The KDE developers.
Generated on Thu Jun 15 2017 13:48:48 by doxygen 1.8.13 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2017 The KDE developers.
Generated on Thu Jun 15 2017 13:48:48 by doxygen 1.8.13 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.