From 0fe3ff5c517e6dfae26600d79d07e92b1ab86843 Mon Sep 17 00:00:00 2001 From: Laurent Montel Date: Tue, 10 Oct 2017 11:02:12 +0200 Subject: PrintSupport: modernize connection signal/slot Change-Id: I6e482cd9503e96cc43ead21122d3690cdb18151c Reviewed-by: David Faure --- src/printsupport/dialogs/qpagesetupdialog_unix.cpp | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'src/printsupport/dialogs/qpagesetupdialog_unix.cpp') diff --git a/src/printsupport/dialogs/qpagesetupdialog_unix.cpp b/src/printsupport/dialogs/qpagesetupdialog_unix.cpp index 0715dfa548..ee7bc62491 100644 --- a/src/printsupport/dialogs/qpagesetupdialog_unix.cpp +++ b/src/printsupport/dialogs/qpagesetupdialog_unix.cpp @@ -260,21 +260,21 @@ QPageSetupWidget::QPageSetupWidget(QWidget *parent) initUnits(); initPagesPerSheet(); - connect(m_ui.unitCombo, SIGNAL(activated(int)), this, SLOT(unitChanged())); + connect(m_ui.unitCombo, QOverload::of(&QComboBox::activated), this, &QPageSetupWidget::unitChanged); - connect(m_ui.pageSizeCombo, SIGNAL(currentIndexChanged(int)), this, SLOT(pageSizeChanged())); - connect(m_ui.pageWidth, SIGNAL(valueChanged(double)), this, SLOT(pageSizeChanged())); - connect(m_ui.pageHeight, SIGNAL(valueChanged(double)), this, SLOT(pageSizeChanged())); + connect(m_ui.pageSizeCombo, QOverload::of(&QComboBox::currentIndexChanged), this, &QPageSetupWidget::pageSizeChanged); + connect(m_ui.pageWidth, QOverload::of(&QDoubleSpinBox::valueChanged), this, &QPageSetupWidget::pageSizeChanged); + connect(m_ui.pageHeight, QOverload::of(&QDoubleSpinBox::valueChanged), this, &QPageSetupWidget::pageSizeChanged); - connect(m_ui.leftMargin, SIGNAL(valueChanged(double)), this, SLOT(leftMarginChanged(double))); - connect(m_ui.topMargin, SIGNAL(valueChanged(double)), this, SLOT(topMarginChanged(double))); - connect(m_ui.rightMargin, SIGNAL(valueChanged(double)), this, SLOT(rightMarginChanged(double))); - connect(m_ui.bottomMargin, SIGNAL(valueChanged(double)), this, SLOT(bottomMarginChanged(double))); + connect(m_ui.leftMargin, QOverload::of(&QDoubleSpinBox::valueChanged), this, &QPageSetupWidget::leftMarginChanged); + connect(m_ui.topMargin, QOverload::of(&QDoubleSpinBox::valueChanged), this, &QPageSetupWidget::topMarginChanged); + connect(m_ui.rightMargin, QOverload::of(&QDoubleSpinBox::valueChanged), this, &QPageSetupWidget::rightMarginChanged); + connect(m_ui.bottomMargin, QOverload::of(&QDoubleSpinBox::valueChanged), this, &QPageSetupWidget::bottomMarginChanged); - connect(m_ui.portrait, SIGNAL(clicked()), this, SLOT(pageOrientationChanged())); - connect(m_ui.landscape, SIGNAL(clicked()), this, SLOT(pageOrientationChanged())); + connect(m_ui.portrait, &QRadioButton::clicked, this, &QPageSetupWidget::pageOrientationChanged); + connect(m_ui.landscape, &QRadioButton::clicked, this, &QPageSetupWidget::pageOrientationChanged); - connect(m_ui.pagesPerSheetCombo, SIGNAL(currentIndexChanged(int)), this, SLOT(pagesPerSheetChanged())); + connect(m_ui.pagesPerSheetCombo, QOverload::of(&QComboBox::currentIndexChanged), this, &QPageSetupWidget::pagesPerSheetChanged); } // Init the Units combo box -- cgit v1.2.3