Commit b21006b7 authored by Harald Sitter's avatar Harald Sitter 💣

fix buttongroup state toggles

this was recently changed on the BugAwarenessPage and broke state
tracking as idPressed is emitted when pressing down, before the group
state actually switches. the yes/no group on that page was effectively
inverted as updateCheckBoxes was called before the property update and
thus when the user clicked Yes the internal state in the slot was still
No and vice versa.

the duplicates dialog similarly was wrong but it's much harder to
stumble over since the relevant UI elements are only visible when trying
to mark a bug duplicate to a closed bug or a "common" bug

use the idClicked signal instead, it's what the code originally used (as
the now deprecated buttonClicked)

BUG: 428346
parent 7df000b8
......@@ -135,9 +135,9 @@ BugAwarenessPage::BugAwarenessPage(ReportAssistantDialog * parent)
"What I was doing when the application \"%1\" crashed",
DrKonqi::crashedApplication()->name()));
connect(ui.m_rememberGroup, &QButtonGroup::idPressed, this, &BugAwarenessPage::updateCheckBoxes);
connect(ui.m_rememberGroup, &QButtonGroup::idClicked, this, &BugAwarenessPage::updateCheckBoxes);
// Also listen to toggle so radio buttons are covered.
connect(ui.m_rememberGroup, &QButtonGroup::idPressed, this, &BugAwarenessPage::updateCheckBoxes);
connect(ui.m_rememberGroup, &QButtonGroup::idClicked, this, &BugAwarenessPage::updateCheckBoxes);
ui.m_appSpecificDetailsExamplesWidget->setVisible(
reportInterface()->appDetailsExamples()->hasExamples());
......
......@@ -999,9 +999,9 @@ BugzillaReportConfirmationDialog::BugzillaReportConfirmationDialog(int bugNumber
connect(ui.buttonGroupProceed, SIGNAL(buttonClicked(int)), this, SLOT(checkProceed()));
connect(ui.buttonGroupProceedQuestion, SIGNAL(buttonClicked(int)), this, SLOT(checkProceed()));
// Also listen to toggle so radio buttons are covered.
connect(ui.buttonGroupProceed, &QButtonGroup::idPressed,
connect(ui.buttonGroupProceed, &QButtonGroup::idClicked,
this, &BugzillaReportConfirmationDialog::checkProceed);
connect(ui.buttonGroupProceedQuestion, &QButtonGroup::idPressed,
connect(ui.buttonGroupProceedQuestion, &QButtonGroup::idClicked,
this, &BugzillaReportConfirmationDialog::checkProceed);
if (!m_showProceedQuestion) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment