summaryrefslogtreecommitdiffstats
path: root/profile-widget/profilewidget2.cpp
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2015-11-05 13:44:19 -0800
committerGravatar Dirk Hohndel <dirk@hohndel.org>2015-11-05 13:45:51 -0800
commite7edaea4f85fc998ed56e098d306b957fd0a24bc (patch)
tree97c5afef165eded2c5829976dc81b1a406bc73bd /profile-widget/profilewidget2.cpp
parent2b9316e16ab94b1a8ef7a0c5abbce2f80abf5053 (diff)
downloadsubsurface-e7edaea4f85fc998ed56e098d306b957fd0a24bc.tar.gz
Untangle Profile from MainWindow: edit current profile
And action can't not just trigger a slot, it can also send a signal. With this there is no reference to the MainWindow left in the profile. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'profile-widget/profilewidget2.cpp')
-rw-r--r--profile-widget/profilewidget2.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/profile-widget/profilewidget2.cpp b/profile-widget/profilewidget2.cpp
index c72f2e95b..275ae6cde 100644
--- a/profile-widget/profilewidget2.cpp
+++ b/profile-widget/profilewidget2.cpp
@@ -30,7 +30,6 @@
#ifndef QT_NO_DEBUG
#include <QTableView>
#endif
-#include "mainwindow.h"
#include "preferences/preferencesdialog.h"
// a couple of helpers we need
@@ -1272,7 +1271,7 @@ void ProfileWidget2::contextMenuEvent(QContextMenuEvent *event)
action->setData(event->globalPos());
if (same_string(current_dc->model, "manually added dive"))
- QAction *editProfileAction = m.addAction(tr("Edit the profile"), MainWindow::instance(), SLOT(editCurrentDive()));
+ QAction *editProfileAction = m.addAction(tr("Edit the profile"), this, SIGNAL(editCurrentDive()));
if (DiveEventItem *item = dynamic_cast<DiveEventItem *>(sceneItem)) {
action = new QAction(&m);