void BookmarksModel::removeBookmark(BookmarksItem *bookmark) { if (!bookmark) { return; } removeBookmarkUrl(bookmark); const quint64 identifier = bookmark->data(IdentifierRole).toULongLong(); if (identifier > 0 && m_identifiers.contains(identifier)) { m_identifiers.remove(identifier); } if (!bookmark->data(KeywordRole).toString().isEmpty() && m_keywords.contains(bookmark->data(KeywordRole).toString())) { m_keywords.remove(bookmark->data(KeywordRole).toString()); } emit bookmarkRemoved(bookmark); bookmark->parent()->removeRow(bookmark->row()); emit modelModified(); }
void Core::RemoveFromFavorites (const QString& url) { emit bookmarkRemoved (url); }