mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-28 05:00:20 +00:00
Cleanup: remove unnecessary signal
The edit dive site button was connected to a *signal* of MainWindow, which was connected to a slot of MainWindow. Remove the unnecessary intermediate signal. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
cd3a8ba354
commit
d0435672ac
3 changed files with 3 additions and 6 deletions
|
@ -218,7 +218,6 @@ MainWindow::MainWindow() : QMainWindow(),
|
|||
connect(DivePlannerPointsModel::instance(), SIGNAL(planCanceled()), this, SLOT(planCanceled()));
|
||||
connect(DivePlannerPointsModel::instance(), SIGNAL(variationsComputed(QString)), this, SLOT(updateVariations(QString)));
|
||||
connect(plannerDetails->printPlan(), SIGNAL(pressed()), divePlannerWidget, SLOT(printDecoPlan()));
|
||||
connect(this, SIGNAL(startDiveSiteEdit()), this, SLOT(on_actionDiveSiteEdit_triggered()));
|
||||
connect(mainTab, &MainTab::diveSiteChanged, mapWidget, &MapWidget::centerOnSelectedDiveSite);
|
||||
connect(this, &MainWindow::showError, ui.mainErrorMessage, &NotificationWidget::showError, Qt::AutoConnection);
|
||||
|
||||
|
@ -386,7 +385,7 @@ void MainWindow::editDiveSite(dive_site *ds)
|
|||
setApplicationState("EditDiveSite");
|
||||
}
|
||||
|
||||
void MainWindow::on_actionDiveSiteEdit_triggered()
|
||||
void MainWindow::startDiveSiteEdit()
|
||||
{
|
||||
editDiveSite(get_dive_site_for_dive(&displayed_dive));
|
||||
}
|
||||
|
|
|
@ -134,7 +134,6 @@ slots:
|
|||
void on_actionReplanDive_triggered();
|
||||
void on_action_Check_for_Updates_triggered();
|
||||
|
||||
void on_actionDiveSiteEdit_triggered();
|
||||
void selectionChanged();
|
||||
void initialUiSetup();
|
||||
|
||||
|
@ -156,7 +155,6 @@ protected:
|
|||
void closeEvent(QCloseEvent *);
|
||||
|
||||
signals:
|
||||
void startDiveSiteEdit();
|
||||
void showError(QString message);
|
||||
|
||||
public
|
||||
|
@ -177,7 +175,7 @@ slots:
|
|||
void disableShortcuts(bool disablePaste = true);
|
||||
void enableShortcuts();
|
||||
void updateVariations(QString);
|
||||
|
||||
void startDiveSiteEdit();
|
||||
|
||||
private:
|
||||
Ui::MainWindow ui;
|
||||
|
|
|
@ -82,7 +82,7 @@ MainTab::MainTab(QWidget *parent) : QTabWidget(parent),
|
|||
ui.weights->setModel(weightModel);
|
||||
closeMessage();
|
||||
|
||||
connect(ui.editDiveSiteButton, SIGNAL(clicked()), MainWindow::instance(), SIGNAL(startDiveSiteEdit()));
|
||||
connect(ui.editDiveSiteButton, &QToolButton::clicked, MainWindow::instance(), &MainWindow::startDiveSiteEdit);
|
||||
connect(ui.location, &DiveLocationLineEdit::entered, MapWidget::instance(), &MapWidget::centerOnIndex);
|
||||
connect(ui.location, &DiveLocationLineEdit::currentChanged, MapWidget::instance(), &MapWidget::centerOnIndex);
|
||||
|
||||
|
|
Loading…
Reference in a new issue