diff options
Diffstat (limited to 'lib/bookmarks/bookmarkswidget.cpp')
-rw-r--r-- | lib/bookmarks/bookmarkswidget.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/lib/bookmarks/bookmarkswidget.cpp b/lib/bookmarks/bookmarkswidget.cpp index cae1eb3..f56c53b 100644 --- a/lib/bookmarks/bookmarkswidget.cpp +++ b/lib/bookmarks/bookmarkswidget.cpp @@ -105,11 +105,6 @@ BookmarksWidget::~BookmarksWidget() delete ui; } -BookmarksView *BookmarksWidget::model() const -{ - return ui->treeWidget; -} - void BookmarksWidget::save() { /* @@ -129,6 +124,13 @@ void BookmarksWidget::save() } } +void BookmarksWidget::addBookmark(const QString &title, const QString &url) +{ + auto *bookmark = ui->treeWidget->createBookmark(nullptr); + bookmark->setText(0, title); + bookmark->setText(1, url); +} + void BookmarksWidget::search(const QString &term, std::function<void(QStringList &)> callback) const { QStringList ret; |