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" );
void setCodec(QTextCodec *codec)
QString caption()
QString i18n(const char *text)
static QDomElement createXbelTopLevelElement(QDomDocument &doc)
Definition: kbookmarkmanager.cc:205
QDomProcessingInstruction createProcessingInstruction(const QString &target, const QString &data)
QFile::FileError error() const
void addFile(const QString &file)
QString path() const
This will return the path that this manager is using to read the bookmarks.
Definition: kbookmarkmanager.cc:463
QDomNode appendChild(const QDomNode &newChild)
void updateFavicon(const QString &url, const QString &faviconurl)
Definition: kbookmarkmanager.cc:660
QString attribute(const QString &name, const QString &defValue) const
void setAutoErrorHandlingEnabled(bool enable, QWidget *parent)
Enable or disable auto error handling is enabled.
Definition: kbookmarkmanager.cc:322
bool remove()
QString toString(int indent) const
QStringList split(const QString &sep, SplitBehavior behavior, Qt::CaseSensitivity cs) const
#define K_GLOBAL_STATIC(TYPE, NAME)
bool startDetached(const QString &program, const QStringList &arguments, const QString &workingDirectory, qint64 *pid)
Definition: netaccess.h:36
virtual bool open(OpenMode flags=QIODevice::ReadWrite)
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
bool registerObject(const QString &path, QObject *object, QFlags< QDBusConnection::RegisterOption > options)
static QDebug kError(bool cond, int area=KDE_DEFAULT_DEBUG_AREA)
KBookmarkGroup toGroup() const
Convert this to a group - do this only if isGroup() returns true.
Definition: kbookmark.cc:465
void slotEditBookmarksAtAddress(const QString &address)
Definition: kbookmarkmanager.cc:631
This class implements the reading/writing of bookmarks in XML.
Definition: kbookmarkmanager.h:65
QDBusConnection sessionBus()
int length() const
bool exists() const
QThread * thread() const
void abort()
void clear()
static QDebug kDebug(bool cond, int area=KDE_DEFAULT_DEBUG_AREA)
Definition: kbookmark.h:34
bool isProcessingInstruction() const
QString baseService() const
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()
bool isNull() const
QString fileName() const
QWidget * activeWindow()
static KBookmarkManager * createTempManager()
only used for KBookmarkBar
Definition: kbookmarkmanager.cc:196
int count(const T &value) const
QString errorString() 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.cc:612
bool updateAccessMetadata(const QString &url)
Update access time stamps for a given url.
Definition: kbookmarkmanager.cc:646
void setAttribute(const QString &name, const QString &value)
void notifyChanged(const QString &groupAddress, const QDBusMessage &msg)
Emit the changed signal for the group whose address is given.
Definition: kbookmarkmanager.cc:595
bool isEmpty() const
bool isGroup() const
Whether the bookmark is a group or a normal bookmark.
Definition: kbookmark.cc:283
bool saveAs(const QString &filename, bool toolbarCache=true) const
Save the bookmarks to the given XML file on disk.
Definition: kbookmarkmanager.cc:401
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
bool save(bool toolbarCache=true) const
Save the bookmarks to an XML file on disk.
Definition: kbookmarkmanager.cc:396
bool autoErrorHandlingEnabled() const
Check whether auto error handling is enabled.
Definition: kbookmarkmanager.cc:317
QString service() const
void changed(const QString &groupAddress, const QString &caller)
Signals that the group (or any of its children) with the address groupAddress (e.g.
QDateTime lastModified() const
KBookmarkGroup toolbar()
This returns the root of the toolbar menu.
Definition: kbookmarkmanager.cc:473
virtual bool open(QFlags< QIODevice::OpenModeFlag > mode)
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
QDomProcessingInstruction toProcessingInstruction() const
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
iterator end()
QDomNode removeChild(const QDomNode &oldChild)
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()
bool isNull() const
KBookmark findByAddress(const QString &address)
Definition: kbookmarkmanager.cc:519
void emitChanged()
Saves the bookmark file and notifies everyone.
Definition: kbookmarkmanager.cc:549
void flush()
QDomNode parentNode() const
static QString locateLocal(const char *type, const QString &filename, const KComponentData &cData=KGlobal::mainComponent())
QThread * currentThread()
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
QTextCodec * codecForName(const QByteArray &name)
#define BOOKMARK_CHANGE_NOTIFY_INTERFACE
Definition: kbookmarkmanager.cc:47
char * data()
static QDebug kWarning(bool cond, int area=KDE_DEFAULT_DEBUG_AREA)
qint64 write(const char *data, qint64 maxSize)
QString fromLatin1(const char *str, int size)
QString tagName() const
QDomElement createElement(const QString &tagName)
bool connect(const QString &service, const QString &path, const QString &interface, const QString &name, QObject *receiver, const char *slot)
QString absolutePath() const
bool connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
static KBookmarkManager * lookupExisting(const QString &bookmarksFile)
Definition: kbookmarkmanager.cc:139
QObject * parent() const
QDomNode insertBefore(const QDomNode &newChild, const QDomNode &refChild)
QString arg(qlonglong a, int fieldWidth, int base, const QChar &fillChar) const
static bool simpleBackupFile(const QString &filename, const QString &backupDir=QString(), const QString &backupExtension=QLatin1String("~"))
QList< Action > parse(QSettings &ini)
T readEntry(const QString &key, const T &aDefault) const
iterator begin()
This class provides a Dialog for editing properties, adding Bookmarks and creating new folders...
Definition: kbookmarkdialog.h:44
Definition: kbookmark.h:459
QDomDocument internalDocument() const
Definition: kbookmarkmanager.cc:333
static void error(QWidget *parent, const QString &text, const QString &caption=QString(), Options options=Notify)
bool mkpath(const QString &dirPath) const
QString address() const
Return the "address" of this bookmark in the whole tree.
Definition: kbookmark.cc:471
QString number(KIO::filesize_t size)
Converts a size to a string representation Not unlike QString::number(...)
Definition: global.cpp:63
QStringList list(const QString &fileClass)
Returns a list of directories associated with this file-class.
Definition: krecentdirs.cpp:60
uint toUInt(bool *ok, int base) const
QByteArray toUtf8() const
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:24:53 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:24:53 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.