mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Cleanup: remove parameter from currentDiveChanged signal
The currentDiveChanged signal was emitted by the DiveListView to inform the MainWindow of a change of current dive. The new current dive was passed as a parameter. The slot in MainWindow then called select_dive() on the dive. This seems pointless because: 1) In both emits, selected_dive dive was passed as argument. But MainWindow can read this global variable itself. 2) Calling select_dive() again is a no-op, because obviously, this already *was* the selected dive. Moreover it seems conceptually wrong to set the current dive in the slot that is informed of the change of the current dive. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
d3f3d82abd
commit
5e1e6110ce
5 changed files with 8 additions and 11 deletions
|
@ -57,7 +57,7 @@ void StarWidget::mouseReleaseEvent(QMouseEvent *event)
|
|||
else
|
||||
current = starClicked;
|
||||
|
||||
Q_EMIT valueChanged(current);
|
||||
emit valueChanged(current);
|
||||
update();
|
||||
}
|
||||
|
||||
|
@ -88,7 +88,7 @@ void StarWidget::setCurrentStars(int value)
|
|||
{
|
||||
current = value;
|
||||
update();
|
||||
Q_EMIT valueChanged(current);
|
||||
emit valueChanged(current);
|
||||
}
|
||||
|
||||
StarWidget::StarWidget(QWidget *parent, Qt::WindowFlags f) : QWidget(parent, f),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue