forked from qt-creator/qt-creator
Utils: Modernize connections
Change-Id: I4650abc84e7c82a4054197319f6c849af9e5b8ce Reviewed-by: hjk <hjk@theqtcompany.com>
This commit is contained in:
@@ -121,10 +121,10 @@ CheckableMessageBox::CheckableMessageBox(QWidget *parent) :
|
||||
{
|
||||
setModal(true);
|
||||
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
|
||||
connect(d->buttonBox, SIGNAL(accepted()), SLOT(accept()));
|
||||
connect(d->buttonBox, SIGNAL(rejected()), SLOT(reject()));
|
||||
connect(d->buttonBox, SIGNAL(clicked(QAbstractButton*)),
|
||||
SLOT(slotClicked(QAbstractButton*)));
|
||||
connect(d->buttonBox, &QDialogButtonBox::accepted, this, &QDialog::accept);
|
||||
connect(d->buttonBox, &QDialogButtonBox::rejected, this, &QDialog::reject);
|
||||
connect(d->buttonBox, &QDialogButtonBox::clicked,
|
||||
this, [this](QAbstractButton *b) { d->clickedButton = b; });
|
||||
}
|
||||
|
||||
CheckableMessageBox::~CheckableMessageBox()
|
||||
@@ -132,11 +132,6 @@ CheckableMessageBox::~CheckableMessageBox()
|
||||
delete d;
|
||||
}
|
||||
|
||||
void CheckableMessageBox::slotClicked(QAbstractButton *b)
|
||||
{
|
||||
d->clickedButton = b;
|
||||
}
|
||||
|
||||
QAbstractButton *CheckableMessageBox::clickedButton() const
|
||||
{
|
||||
return d->clickedButton;
|
||||
|
||||
Reference in New Issue
Block a user