summaryrefslogtreecommitdiff
path: root/src/bookmarks/bookmarksmenu.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/bookmarks/bookmarksmenu.cpp')
-rw-r--r--src/bookmarks/bookmarksmenu.cpp41
1 files changed, 0 insertions, 41 deletions
diff --git a/src/bookmarks/bookmarksmenu.cpp b/src/bookmarks/bookmarksmenu.cpp
deleted file mode 100644
index aad7289e..00000000
--- a/src/bookmarks/bookmarksmenu.cpp
+++ /dev/null
@@ -1,41 +0,0 @@
-/* ============================================================
- * The rekonq project
- * ============================================================
- * SPDX-License-Identifier: GPL-2.0-or-later
- * Copyright (C) 2008-2013 by Andrea Diamantini <adjam7 at gmail dot com>
- * Copyright (C) 2010 by Yoann Laissus <yoann dot laissus at gmail dot com>
- * SPDX-License-Identifier: GPL-3.0-only
- * Copyright (C) 2022 aqua <aqua@iserlohn-fortress.net>
- * ============================================================ */
-
-#include "bookmarksmenu.hpp"
-#include "bookmarkstreemodel.hpp"
-
-BookmarksMenu::BookmarksMenu(QWidget *parent) : QMenu(parent)
-{
- connect(this, &QMenu::aboutToShow, this, &BookmarksMenu::refill);
-}
-
-void BookmarksMenu::refill()
-{
- Q_CHECK_PTR(model);
-
- for (auto *a : actions) {
- removeAction(a);
- delete a;
- }
- actions.clear();
-
- actions.append(addSeparator());
-
- const auto *root = model->item();
- Q_CHECK_PTR(root);
- for (int i = 0; i < root->childCount(); ++i) {
- const auto *child = root->child(i);
- if (child->type() != BookmarksTreeItem::Bookmark) continue;
- auto *action = addAction(child->data(BookmarksTreeItem::Title).toString(), this, [this, child]() {
- emit loadUrl(child->data(BookmarksTreeItem::Href).toUrl(), rekonq::CurrentTab);
- });
- actions.append(action);
- }
-}