summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swift/QtUI/QtMainWindow.cpp')
-rw-r--r--Swift/QtUI/QtMainWindow.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/Swift/QtUI/QtMainWindow.cpp b/Swift/QtUI/QtMainWindow.cpp
index b8d9a5c..c0276c4 100644
--- a/Swift/QtUI/QtMainWindow.cpp
+++ b/Swift/QtUI/QtMainWindow.cpp
@@ -44,6 +44,8 @@ QtMainWindow::QtMainWindow(UIEventStream* uiEventStream, QtTreeWidgetFactory *tr
contactTabLayout->setContentsMargins(0, 0, 0, 0);
treeWidget_ = dynamic_cast<QtTreeWidget*>(treeWidgetFactory->createTreeWidget());
+ contextMenu_ = new QtRosterContextMenu(uiEventStream_);
+ treeWidget_->setContextMenu(contextMenu_);
treeWidget_->setVerticalScrollMode(QAbstractItemView::ScrollPerPixel);
contactTabLayout->addWidget(treeWidget_);
@@ -80,6 +82,10 @@ QtMainWindow::QtMainWindow(UIEventStream* uiEventStream, QtTreeWidgetFactory *tr
chatMenu->addAction(signOutAction);
}
+QtMainWindow::~QtMainWindow() {
+ delete contextMenu_;
+}
+
QtEventWindow* QtMainWindow::getEventWindow() {
return eventWindow_;
}