Differential D6161 Diff 15415 drkonqi/bugzillaintegration/reportassistantpages_bugzilla_duplicates.cpp
Changeset View
Changeset View
Standalone View
Standalone View
drkonqi/bugzillaintegration/reportassistantpages_bugzilla_duplicates.cpp
Show First 20 Lines • Show All 894 Lines • ▼ Show 20 Line(s) | 888 | { | |||
---|---|---|---|---|---|
895 | setWindowTitle(i18nc("@title:window", "Related Bug Report")); | 895 | setWindowTitle(i18nc("@title:window", "Related Bug Report")); | ||
896 | 896 | | |||
897 | //Setup buttons | 897 | //Setup buttons | ||
898 | ui.buttonBox->button(QDialogButtonBox::Cancel)->setText(i18nc("@action:button", "Cancel (Go back to the report)")); | 898 | ui.buttonBox->button(QDialogButtonBox::Cancel)->setText(i18nc("@action:button", "Cancel (Go back to the report)")); | ||
899 | ui.buttonBox->button(QDialogButtonBox::Ok)->setText(i18nc("@action:button continue with the selected option " | 899 | ui.buttonBox->button(QDialogButtonBox::Ok)->setText(i18nc("@action:button continue with the selected option " | ||
900 | "and close the dialog", "Continue")); | 900 | "and close the dialog", "Continue")); | ||
901 | ui.buttonBox->button(QDialogButtonBox::Ok)->setEnabled(false); | 901 | ui.buttonBox->button(QDialogButtonBox::Ok)->setEnabled(false); | ||
902 | 902 | | |||
903 | connect(this, SIGNAL(okClicked()) , this, SLOT(proceedClicked())); | 903 | connect(this, &BugzillaReportConfirmationDialog::accepted, | ||
904 | connect(this, SIGNAL(cancelClicked()) , this, SLOT(hide())); | 904 | this, &BugzillaReportConfirmationDialog::proceedClicked); | ||
905 | connect(this, &BugzillaReportConfirmationDialog::rejected, | ||||
906 | this, &BugzillaReportConfirmationDialog::hide); | ||||
905 | 907 | | |||
906 | //Set introduction text | 908 | //Set introduction text | ||
907 | ui.introLabel->setText(i18n("You are going to mark your crash as related to bug %1", | 909 | ui.introLabel->setText(i18n("You are going to mark your crash as related to bug %1", | ||
908 | QString::number(m_bugNumber))); | 910 | QString::number(m_bugNumber))); | ||
909 | 911 | | |||
910 | if (commonCrash) { //Common ("massive") crash | 912 | if (commonCrash) { //Common ("massive") crash | ||
911 | m_showProceedQuestion = true; | 913 | m_showProceedQuestion = true; | ||
912 | ui.commonCrashIcon->setPixmap(QIcon::fromTheme(QStringLiteral("edit-bomb")).pixmap(22,22)); | 914 | ui.commonCrashIcon->setPixmap(QIcon::fromTheme(QStringLiteral("edit-bomb")).pixmap(22,22)); | ||
Show All 18 Lines | |||||
931 | //Disable all the radio buttons | 933 | //Disable all the radio buttons | ||
932 | ui.proceedRadioYes->setChecked(false); | 934 | ui.proceedRadioYes->setChecked(false); | ||
933 | ui.proceedRadioNo->setChecked(false); | 935 | ui.proceedRadioNo->setChecked(false); | ||
934 | ui.markAsDuplicateCheck->setChecked(false); | 936 | ui.markAsDuplicateCheck->setChecked(false); | ||
935 | ui.attachToBugReportCheck->setChecked(false); | 937 | ui.attachToBugReportCheck->setChecked(false); | ||
936 | 938 | | |||
937 | connect(ui.buttonGroupProceed, SIGNAL(buttonClicked(int)), this, SLOT(checkProceed())); | 939 | connect(ui.buttonGroupProceed, SIGNAL(buttonClicked(int)), this, SLOT(checkProceed())); | ||
938 | connect(ui.buttonGroupProceedQuestion, SIGNAL(buttonClicked(int)), this, SLOT(checkProceed())); | 940 | connect(ui.buttonGroupProceedQuestion, SIGNAL(buttonClicked(int)), this, SLOT(checkProceed())); | ||
941 | // Also listen to toggle so radio buttons are covered. | ||||
942 | connect(ui.buttonGroupProceed, static_cast<void (QButtonGroup::*)(int, bool)>(&QButtonGroup::buttonToggled), | ||||
943 | this, &BugzillaReportConfirmationDialog::checkProceed); | ||||
944 | connect(ui.buttonGroupProceedQuestion, static_cast<void (QButtonGroup::*)(int, bool)>(&QButtonGroup::buttonToggled), | ||||
945 | this, &BugzillaReportConfirmationDialog::checkProceed); | ||||
939 | 946 | | |||
940 | if (!m_showProceedQuestion) { | 947 | if (!m_showProceedQuestion) { | ||
941 | ui.proceedLabel->setEnabled(false); | 948 | ui.proceedLabel->setEnabled(false); | ||
942 | ui.proceedRadioYes->setEnabled(false); | 949 | ui.proceedRadioYes->setEnabled(false); | ||
943 | ui.proceedRadioNo->setEnabled(false); | 950 | ui.proceedRadioNo->setEnabled(false); | ||
944 | 951 | | |||
945 | ui.proceedLabel->setVisible(false); | 952 | ui.proceedLabel->setVisible(false); | ||
946 | ui.proceedRadioYes->setVisible(false); | 953 | ui.proceedRadioYes->setVisible(false); | ||
▲ Show 20 Lines • Show All 49 Lines • Show Last 20 Lines |