MCPcopy Create free account
hub / github.com/MITK/MITK / SetUiFinished

Method SetUiFinished

Modules/PythonInstallerUI/src/QmitkPipInstallDialog.cpp:405–427  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

403}
404
405void QmitkPipInstallDialog::SetUiFinished(bool success)
406{
407 // Clear both possible accepted-slot bindings before rewiring so repeated
408 // fail/retry cycles don't accumulate duplicate connections. Otherwise the
409 // constructor's connect to OnInstallClicked survives the failure path and
410 // SetUiFinished(false) would stack a second connect on top of it, causing
411 // a single Retry click to fire OnInstallClicked twice.
412 disconnect(m_Ui->buttonBox, &QDialogButtonBox::accepted, this, &QmitkPipInstallDialog::OnInstallClicked);
413 disconnect(m_Ui->buttonBox, &QDialogButtonBox::accepted, this, &QDialog::accept);
414
415 if (success)
416 {
417 m_Ui->buttonBox->setStandardButtons(QDialogButtonBox::Ok);
418 connect(m_Ui->buttonBox, &QDialogButtonBox::accepted, this, &QDialog::accept);
419 }
420 else
421 {
422 m_Ui->buttonBox->setStandardButtons(QDialogButtonBox::Retry | QDialogButtonBox::Cancel);
423 connect(m_Ui->buttonBox, &QDialogButtonBox::accepted, this, &QmitkPipInstallDialog::OnInstallClicked);
424 }
425
426 m_Ui->buttonBox->setEnabled(true);
427}
428
429void QmitkPipInstallDialog::OfferDetails()
430{

Callers 2

OnInstallFinishedMethod · 0.95
OnErrorOccurredMethod · 0.95

Calls 1

setEnabledMethod · 0.45

Tested by

no test coverage detected