utils: Update messageBoxChecked to use bool directly, no local copy

This commit is contained in:
Cody Northrop
2017-08-15 09:36:20 -07:00
committed by Baldur Karlsson
parent fb8eef23d0
commit b52d91224e
+1 -3
View File
@@ -448,7 +448,6 @@ QMessageBox::StandardButton RDDialog::messageBoxChecked(QMessageBox::Icon icon,
QMessageBox::StandardButtons buttons,
QMessageBox::StandardButton defaultButton)
{
bool isChecked = checked;
QMessageBox::StandardButton ret = defaultButton;
// if we're already on the right thread, this boils down to a function call
@@ -457,11 +456,10 @@ QMessageBox::StandardButton RDDialog::messageBoxChecked(QMessageBox::Icon icon,
mb.setDefaultButton(defaultButton);
mb.setCheckBox(checkBox);
show(&mb);
isChecked = mb.checkBox()->isChecked();
checked = mb.checkBox()->isChecked();
ret = mb.standardButton(mb.clickedButton());
});
checked = isChecked;
return ret;
}