diff options
author | con <[email protected]> | 2011-01-17 13:52:14 +0100 |
---|---|---|
committer | con <[email protected]> | 2011-01-17 13:52:33 +0100 |
commit | edd7224cd69dd270d860674192b150de22aa6017 (patch) | |
tree | 6ff58dc4067546b8e63e817a871880197e228c89 /src/libs/utils/checkablemessagebox.cpp | |
parent | daafa533d6e9d2efbbfdbf97d44ee8edabbaa957 (diff) |
Add "never ask again" option to dialog asking about killing applications
The option is used for the stop button in the application output.
Closing tabs will still ask unconditionally, also if applications would
be killed as a side-effect, e.g. of closing Qt Creator.
The Symbian controls also always ask, with a more descriptive text,
because killing applications might have negative effect on the device in
some cases.
Reviewed-by: Friedemann Kleint
Task-number: QTCREATORBUG-3119
Diffstat (limited to 'src/libs/utils/checkablemessagebox.cpp')
-rw-r--r-- | src/libs/utils/checkablemessagebox.cpp | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/libs/utils/checkablemessagebox.cpp b/src/libs/utils/checkablemessagebox.cpp index b0a28492d18..25f04538aa5 100644 --- a/src/libs/utils/checkablemessagebox.cpp +++ b/src/libs/utils/checkablemessagebox.cpp @@ -124,6 +124,16 @@ void CheckableMessageBox::setCheckBoxText(const QString &t) m_d->ui.checkBox->setText(t); } +bool CheckableMessageBox::isCheckBoxVisible() const +{ + return m_d->ui.checkBox->isVisible(); +} + +void CheckableMessageBox::setCheckBoxVisible(bool v) +{ + m_d->ui.checkBox->setVisible(v); +} + QDialogButtonBox::StandardButtons CheckableMessageBox::standardButtons() const { return m_d->ui.buttonBox->standardButtons(); @@ -134,6 +144,16 @@ void CheckableMessageBox::setStandardButtons(QDialogButtonBox::StandardButtons s m_d->ui.buttonBox->setStandardButtons(s); } +QPushButton *CheckableMessageBox::button(QDialogButtonBox::StandardButton b) const +{ + return m_d->ui.buttonBox->button(b); +} + +QPushButton *CheckableMessageBox::addButton(const QString &text, QDialogButtonBox::ButtonRole role) +{ + return m_d->ui.buttonBox->addButton(text, role); +} + QDialogButtonBox::StandardButton CheckableMessageBox::defaultButton() const { foreach (QAbstractButton *b, m_d->ui.buttonBox->buttons()) |