aboutsummaryrefslogtreecommitdiffstats
path: root/src/libs/utils/checkablemessagebox.h
diff options
context:
space:
mode:
authorEike Ziller <eike.ziller@digia.com>2013-10-31 15:39:49 +0100
committerEike Ziller <eike.ziller@digia.com>2013-11-01 10:14:39 +0100
commit36f149342d633d48b2f4a424c7562a4f16c98564 (patch)
tree4d210c1383720081df863b07c546ae3a260c52f3 /src/libs/utils/checkablemessagebox.h
parent949bd4239932d6b7333b1100cfa5bfc8f50e7440 (diff)
Make "Reset warnings" option reset "Do not ask again" messages.
And unify them. Task-number: QTCREATORBUG-10523 Change-Id: I1e1262ff25f51e6068e16adaeb25d553f9bffb1f Reviewed-by: hjk <hjk121@nokiamail.com> Reviewed-by: Eike Ziller <eike.ziller@digia.com>
Diffstat (limited to 'src/libs/utils/checkablemessagebox.h')
-rw-r--r--src/libs/utils/checkablemessagebox.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/libs/utils/checkablemessagebox.h b/src/libs/utils/checkablemessagebox.h
index 42756a4d49c..f71c65e2b67 100644
--- a/src/libs/utils/checkablemessagebox.h
+++ b/src/libs/utils/checkablemessagebox.h
@@ -35,6 +35,10 @@
#include <QDialogButtonBox>
#include <QMessageBox>
+QT_BEGIN_NAMESPACE
+class QSettings;
+QT_END_NAMESPACE
+
namespace Utils {
class CheckableMessageBoxPrivate;
@@ -71,6 +75,16 @@ public:
QDialogButtonBox::StandardButtons buttons = QDialogButtonBox::Ok,
QDialogButtonBox::StandardButton defaultButton = QDialogButtonBox::NoButton);
+ static QDialogButtonBox::StandardButton
+ doNotAskAgainQuestion(QWidget *parent,
+ const QString &title,
+ const QString &text,
+ QSettings *settings,
+ const QString &settingsSubKey,
+ QDialogButtonBox::StandardButtons buttons = QDialogButtonBox::Yes|QDialogButtonBox::No,
+ QDialogButtonBox::StandardButton defaultButton = QDialogButtonBox::No,
+ QDialogButtonBox::StandardButton acceptButton = QDialogButtonBox::Yes);
+
QString text() const;
void setText(const QString &);
@@ -101,6 +115,9 @@ public:
// Conversion convenience
static QMessageBox::StandardButton dialogButtonBoxToMessageBoxButton(QDialogButtonBox::StandardButton);
+ static void resetAllDoNotAskAgainQuestions(QSettings *settings);
+ static bool hasSuppressedQuestions(QSettings *settings);
+ static QString msgDoNotAskAgain();
private slots:
void slotClicked(QAbstractButton *b);