cleanup: use pointer-to-member version of connect in SetpointDialog

While touching this dialog, might as well change away from the MOC
version of the connect() statements.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
Berthold Stoeger 2020-03-03 23:13:07 +01:00
parent 806cfcee21
commit adb53f9c18

View file

@ -189,11 +189,11 @@ SetpointDialog::SetpointDialog(struct divecomputer *dcIn, int seconds) : QDialog
dc(dcIn), time(seconds < 0 ? 0 : seconds) dc(dcIn), time(seconds < 0 ? 0 : seconds)
{ {
ui.setupUi(this); ui.setupUi(this);
connect(ui.buttonBox, SIGNAL(clicked(QAbstractButton *)), this, SLOT(buttonClicked(QAbstractButton *))); connect(ui.buttonBox, &QDialogButtonBox::clicked, this, &SetpointDialog::buttonClicked);
QShortcut *close = new QShortcut(QKeySequence(Qt::CTRL + Qt::Key_W), this); QShortcut *close = new QShortcut(QKeySequence(Qt::CTRL + Qt::Key_W), this);
connect(close, SIGNAL(activated()), this, SLOT(close())); connect(close, &QShortcut::activated, this, &QDialog::close);
QShortcut *quit = new QShortcut(QKeySequence(Qt::CTRL + Qt::Key_Q), this); QShortcut *quit = new QShortcut(QKeySequence(Qt::CTRL + Qt::Key_Q), this);
connect(quit, SIGNAL(activated()), parent(), SLOT(close())); connect(quit, &QShortcut::activated, MainWindow::instance(), &QWidget::close);
} }
ShiftTimesDialog *ShiftTimesDialog::instance() ShiftTimesDialog *ShiftTimesDialog::instance()