diff options
author | Jochen Seemann <seemann.jochen@gmail.com> | 2017-11-23 21:12:24 +0100 |
---|---|---|
committer | Jochen Seemann <seemann.jochen@gmail.com> | 2017-12-19 12:04:34 +0000 |
commit | 93630cd621b472d73fc8456ca396cda012a1aee0 (patch) | |
tree | bb42ea8fc88d5961493caccbd116c5b1748a089f /examples/multimedia/spectrum/app/settingsdialog.cpp | |
parent | 5629823b05ca7d24924ac879b5a0469a3cb03e78 (diff) |
examples: use Qt5-style connects where possible
Additionally, remove obsolete CHECKED_CONNECT macro from
the spectrum example.
Change-Id: Id6fe01718679463c2b025d688c970583d64d60e9
Reviewed-by: VaL Doroshchuk <valentyn.doroshchuk@qt.io>
Reviewed-by: Christian Stromme <christian.stromme@qt.io>
Diffstat (limited to 'examples/multimedia/spectrum/app/settingsdialog.cpp')
-rw-r--r-- | examples/multimedia/spectrum/app/settingsdialog.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/examples/multimedia/spectrum/app/settingsdialog.cpp b/examples/multimedia/spectrum/app/settingsdialog.cpp index 109817cd2..f1723077e 100644 --- a/examples/multimedia/spectrum/app/settingsdialog.cpp +++ b/examples/multimedia/spectrum/app/settingsdialog.cpp @@ -114,12 +114,12 @@ SettingsDialog::SettingsDialog( windowFunctionLayout.take(); // ownership transferred to dialogLayout // Connect - CHECKED_CONNECT(m_inputDeviceComboBox, SIGNAL(activated(int)), - this, SLOT(inputDeviceChanged(int))); - CHECKED_CONNECT(m_outputDeviceComboBox, SIGNAL(activated(int)), - this, SLOT(outputDeviceChanged(int))); - CHECKED_CONNECT(m_windowFunctionComboBox, SIGNAL(activated(int)), - this, SLOT(windowFunctionChanged(int))); + connect(m_inputDeviceComboBox, QOverload<int>::of(&QComboBox::activated), + this, &SettingsDialog::inputDeviceChanged); + connect(m_outputDeviceComboBox, QOverload<int>::of(&QComboBox::activated), + this, &SettingsDialog::outputDeviceChanged); + connect(m_windowFunctionComboBox, QOverload<int>::of(&QComboBox::activated), + this, &SettingsDialog::windowFunctionChanged); // Add standard buttons to layout QDialogButtonBox *buttonBox = new QDialogButtonBox(this); @@ -127,10 +127,10 @@ SettingsDialog::SettingsDialog( dialogLayout->addWidget(buttonBox); // Connect standard buttons - CHECKED_CONNECT(buttonBox->button(QDialogButtonBox::Ok), SIGNAL(clicked()), - this, SLOT(accept())); - CHECKED_CONNECT(buttonBox->button(QDialogButtonBox::Cancel), SIGNAL(clicked()), - this, SLOT(reject())); + connect(buttonBox->button(QDialogButtonBox::Ok), &QPushButton::clicked, + this, &SettingsDialog::accept); + connect(buttonBox->button(QDialogButtonBox::Cancel), &QPushButton::clicked, + this, &SettingsDialog::reject); setLayout(dialogLayout); } |