| 605 | } |
| 606 | |
| 607 | void CMakeSetupDialog::closeEvent(QCloseEvent* e) |
| 608 | { |
| 609 | // prompt for close if there are unsaved changes, and we're not busy |
| 610 | if (this->CacheModified) { |
| 611 | QString msg = tr("You have changed options but not rebuilt, " |
| 612 | "are you sure you want to exit?"); |
| 613 | QString title = tr("Confirm Exit"); |
| 614 | QMessageBox::StandardButton btn; |
| 615 | btn = QMessageBox::critical(this, title, msg, |
| 616 | QMessageBox::Yes | QMessageBox::No); |
| 617 | if (btn == QMessageBox::No) { |
| 618 | e->ignore(); |
| 619 | } |
| 620 | } |
| 621 | |
| 622 | // don't close if we're busy, unless the user really wants to |
| 623 | if (this->CurrentState == Configuring) { |
| 624 | QString msg = |
| 625 | tr("You are in the middle of a Configure.\n" |
| 626 | "If you Exit now the configure information will be lost.\n" |
| 627 | "Are you sure you want to Exit?"); |
| 628 | QString title = tr("Confirm Exit"); |
| 629 | QMessageBox::StandardButton btn; |
| 630 | btn = QMessageBox::critical(this, title, msg, |
| 631 | QMessageBox::Yes | QMessageBox::No); |
| 632 | if (btn == QMessageBox::No) { |
| 633 | e->ignore(); |
| 634 | } else { |
| 635 | this->doInterrupt(); |
| 636 | } |
| 637 | } |
| 638 | |
| 639 | // let the generate finish |
| 640 | if (this->CurrentState == Generating) { |
| 641 | e->ignore(); |
| 642 | } |
| 643 | } |
| 644 | |
| 645 | void CMakeSetupDialog::doHelp() |
| 646 | { |
nothing calls this directly
no test coverage detected