aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2015-11-05 12:58:24 -0800
committerGravatar Dirk Hohndel <dirk@hohndel.org>2015-11-05 13:45:51 -0800
commite70e34801eaacfd3d44cbcb202f570f25b1fc615 (patch)
tree516d59321cb3273b0e50f46763beb44bb9a1b0b0
parente28f171731122e6ce1c3d9b1173be5d62dd34e6b (diff)
downloadsubsurface-e70e34801eaacfd3d44cbcb202f570f25b1fc615.tar.gz
Untangle Profile from MainWindow: make profile the parent of dialogs
I don't quite know why these were parented to the MainWindow - I bet there's a very clever reason that I'm missing... Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
-rw-r--r--profile-widget/profilewidget2.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/profile-widget/profilewidget2.cpp b/profile-widget/profilewidget2.cpp
index 310652b75..7b46d6b22 100644
--- a/profile-widget/profilewidget2.cpp
+++ b/profile-widget/profilewidget2.cpp
@@ -1373,7 +1373,7 @@ void ProfileWidget2::hideEvents()
DiveEventItem *item = static_cast<DiveEventItem *>(action->data().value<void *>());
struct event *event = item->getEvent();
- if (QMessageBox::question(MainWindow::instance(),
+ if (QMessageBox::question(this,
TITLE_OR_TEXT(tr("Hide events"), tr("Hide all %1 events?").arg(event->name)),
QMessageBox::Ok | QMessageBox::Cancel) == QMessageBox::Ok) {
if (!same_string(event->name, "")) {
@@ -1408,9 +1408,9 @@ void ProfileWidget2::removeEvent()
DiveEventItem *item = static_cast<DiveEventItem *>(action->data().value<void *>());
struct event *event = item->getEvent();
- if (QMessageBox::question(MainWindow::instance(), TITLE_OR_TEXT(
- tr("Remove the selected event?"),
- tr("%1 @ %2:%3").arg(event->name).arg(event->time.seconds / 60).arg(event->time.seconds % 60, 2, 10, QChar('0'))),
+ if (QMessageBox::question(this, TITLE_OR_TEXT(
+ tr("Remove the selected event?"),
+ tr("%1 @ %2:%3").arg(event->name).arg(event->time.seconds / 60).arg(event->time.seconds % 60, 2, 10, QChar('0'))),
QMessageBox::Ok | QMessageBox::Cancel) == QMessageBox::Ok) {
remove_event(event);
mark_divelist_changed(true);
@@ -1525,7 +1525,7 @@ void ProfileWidget2::editName()
DiveEventItem *item = static_cast<DiveEventItem *>(action->data().value<void *>());
struct event *event = item->getEvent();
bool ok;
- QString newName = QInputDialog::getText(MainWindow::instance(), tr("Edit name of bookmark"),
+ QString newName = QInputDialog::getText(this, tr("Edit name of bookmark"),
tr("Custom name:"), QLineEdit::Normal,
event->name, &ok);
if (ok && !newName.isEmpty()) {