aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/bookmarks/bookmarkswidget.cpp4
-rw-r--r--src/browser.cpp2
2 files changed, 3 insertions, 3 deletions
diff --git a/lib/bookmarks/bookmarkswidget.cpp b/lib/bookmarks/bookmarkswidget.cpp
index c57af57..9bb29f8 100644
--- a/lib/bookmarks/bookmarkswidget.cpp
+++ b/lib/bookmarks/bookmarkswidget.cpp
@@ -78,9 +78,9 @@ BookmarksWidget::BookmarksWidget(const QString &path, QWidget *parent)
const QModelIndex idx = ui->treeView->indexAt(pos);
if(idx.isValid()) {
const QUrl url = model->data(idx, 1, Qt::DisplayRole).toUrl();
- const QPoint pos = ui->treeView->viewport()->mapToGlobal(pos);
+ const QPoint _pos = ui->treeView->viewport()->mapToGlobal(pos);
- emit showContextMenu(url, pos);
+ emit showContextMenu(url, _pos);
}
});
diff --git a/src/browser.cpp b/src/browser.cpp
index 8c1dcf1..42bbc5d 100644
--- a/src/browser.cpp
+++ b/src/browser.cpp
@@ -187,7 +187,7 @@ void Browser::setup(QVector<QPluginLoader *> plugins)
// bookmarks
m_bookmarks = std::make_shared<BookmarksWidget>(QString::fromStdString(m_config->value<std::string>("bookmarks.path").value()));
connect(m_bookmarks.get(), &BookmarksWidget::showContextMenu, this, [this](const QUrl &url, const QPoint &pos) {
- auto *menu = new QMenu(m_windows.last());
+ auto *menu = new QMenu(m_bookmarks.get());
auto *subwindow = m_windows.last()->currentSubWindow();
if(subwindow == nullptr)
return;