From adb53f9c18070e524a2635c5a1d983556f21d5ea Mon Sep 17 00:00:00 2001 From: Berthold Stoeger Date: Tue, 3 Mar 2020 23:13:07 +0100 Subject: 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 --- desktop-widgets/simplewidgets.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/desktop-widgets/simplewidgets.cpp b/desktop-widgets/simplewidgets.cpp index cbf37c398..4b85a8b50 100644 --- a/desktop-widgets/simplewidgets.cpp +++ b/desktop-widgets/simplewidgets.cpp @@ -189,11 +189,11 @@ SetpointDialog::SetpointDialog(struct divecomputer *dcIn, int seconds) : QDialog dc(dcIn), time(seconds < 0 ? 0 : seconds) { 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); - 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); - connect(quit, SIGNAL(activated()), parent(), SLOT(close())); + connect(quit, &QShortcut::activated, MainWindow::instance(), &QWidget::close); } ShiftTimesDialog *ShiftTimesDialog::instance() -- cgit v1.2.3-70-g09d2