aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/bookmarks
diff options
context:
space:
mode:
authorChristian Kandeler <christian.kandeler@qt.io>2020-01-23 12:11:59 +0100
committerChristian Kandeler <christian.kandeler@qt.io>2020-01-27 09:12:52 +0000
commit2c295905a9e45b0560cc08b2c49c2971aa0fe4d1 (patch)
tree8d222f7d43cbb4db4f0e858c3ec7c1e84071ce20 /src/plugins/bookmarks
parent5fc456dd2283b2d1e6c4e6d34856052658f34cc4 (diff)
Fix various leaks relating to use of Core::NavigationView
Change-Id: I8ba508b279376047bcf7ae17dbdadba70ec13582 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Diffstat (limited to 'src/plugins/bookmarks')
-rw-r--r--src/plugins/bookmarks/bookmarkmanager.cpp6
-rw-r--r--src/plugins/bookmarks/bookmarkmanager.h2
2 files changed, 4 insertions, 4 deletions
diff --git a/src/plugins/bookmarks/bookmarkmanager.cpp b/src/plugins/bookmarks/bookmarkmanager.cpp
index 89bb911de7..f4147f02a3 100644
--- a/src/plugins/bookmarks/bookmarkmanager.cpp
+++ b/src/plugins/bookmarks/bookmarkmanager.cpp
@@ -216,15 +216,15 @@ BookmarkView::~BookmarkView()
ICore::removeContextObject(m_bookmarkContext);
}
-QList<QToolButton *> BookmarkView::createToolBarWidgets() const
+QList<QToolButton *> BookmarkView::createToolBarWidgets()
{
Command *prevCmd = ActionManager::command(Constants::BOOKMARKS_PREV_ACTION);
Command *nextCmd = ActionManager::command(Constants::BOOKMARKS_NEXT_ACTION);
QTC_ASSERT(prevCmd && nextCmd, return {});
- auto prevButton = new QToolButton;
+ auto prevButton = new QToolButton(this);
prevButton->setToolButtonStyle(Qt::ToolButtonIconOnly);
prevButton->setDefaultAction(prevCmd->action());
- auto nextButton = new QToolButton;
+ auto nextButton = new QToolButton(this);
nextButton->setToolButtonStyle(Qt::ToolButtonIconOnly);
nextButton->setDefaultAction(nextCmd->action());
return {prevButton, nextButton};
diff --git a/src/plugins/bookmarks/bookmarkmanager.h b/src/plugins/bookmarks/bookmarkmanager.h
index 24ff63742b..760dcde693 100644
--- a/src/plugins/bookmarks/bookmarkmanager.h
+++ b/src/plugins/bookmarks/bookmarkmanager.h
@@ -130,7 +130,7 @@ public:
explicit BookmarkView(BookmarkManager *manager);
~BookmarkView() final;
- QList<QToolButton *> createToolBarWidgets() const;
+ QList<QToolButton *> createToolBarWidgets();
public slots:
void gotoBookmark(const QModelIndex &index);