Simplify signal handling after dive site editing

Since commit 01d961086c, MainWindow::refreshDisplay()
is called in the refreshDiveInfo() signal of maintab after editing a
dive site. Since this was the only use of the refreshDiveInfo signal,
remove this signal and instead connect to MainWindow::refreshDisplay directly.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
Berthold Stoeger 2017-11-26 10:01:11 +01:00 committed by Dirk Hohndel
parent bf65f1e507
commit 2a0520d57d
3 changed files with 1 additions and 12 deletions

View file

@ -159,10 +159,7 @@ MainWindow::MainWindow() : QMainWindow(),
LocationInformationWidget * diveSiteEdit = new LocationInformationWidget();
connect(diveSiteEdit, &LocationInformationWidget::endEditDiveSite,
this, &MainWindow::setDefaultState);
connect(diveSiteEdit, &LocationInformationWidget::endEditDiveSite,
mainTab, &MainTab::refreshDiveInfo);
connect(diveSiteEdit, SIGNAL(endEditDiveSite()), this, SLOT(refreshDisplay()));
connect(diveSiteEdit, &LocationInformationWidget::endEditDiveSite,
mainTab, &MainTab::refreshDisplayedDiveSite);

View file

@ -382,13 +382,6 @@ void MainTab::showLocation()
ui.location->clear();
}
// Seems wrong, since we can also call updateDiveInfo(), but since the updateDiveInfo
// has a parameter on it's definition it didn't worked on the signal slot connection.
void MainTab::refreshDiveInfo()
{
MainWindow::instance()->refreshDisplay();
}
void MainTab::updateDepthDuration()
{
ui.depth->setVisible(true);

View file

@ -64,7 +64,6 @@ public
slots:
void addCylinder_clicked();
void addWeight_clicked();
void refreshDiveInfo();
void updateDiveInfo(bool clear = false);
void updateDepthDuration();
void acceptChanges();