summaryrefslogtreecommitdiff
path: root/Source/Core/DolphinQt2/InDevelopmentWarning.cpp
diff options
context:
space:
mode:
authorspycrab <spycrab@users.noreply.github.com>2017-09-02 20:40:18 +0200
committerspycrab <spycrab@users.noreply.github.com>2017-09-03 03:46:23 +0200
commit0d3c4a38839bdbdabc783fa977c78dcd6f166091 (patch)
treedf2a8fb2dcdb2f0dd4050e50305bacf6c2781324 /Source/Core/DolphinQt2/InDevelopmentWarning.cpp
parentab27f0f78cc52a5c49864f53913215a31bade62d (diff)
Qt/DevelopmentWarning: Add "Don't show me this warning again" option
Diffstat (limited to 'Source/Core/DolphinQt2/InDevelopmentWarning.cpp')
-rw-r--r--Source/Core/DolphinQt2/InDevelopmentWarning.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/Source/Core/DolphinQt2/InDevelopmentWarning.cpp b/Source/Core/DolphinQt2/InDevelopmentWarning.cpp
index bacbf6de21..bf3b7961e5 100644
--- a/Source/Core/DolphinQt2/InDevelopmentWarning.cpp
+++ b/Source/Core/DolphinQt2/InDevelopmentWarning.cpp
@@ -4,6 +4,7 @@
#include <QApplication>
#include <QBoxLayout>
+#include <QCheckBox>
#include <QCommandLinkButton>
#include <QDialogButtonBox>
#include <QFileInfo>
@@ -12,6 +13,7 @@
#include <QProcess>
#include <QStyle>
+#include "Core/ConfigManager.h"
#include "DolphinQt2/InDevelopmentWarning.h"
#include "DolphinQt2/Resources.h"
@@ -40,6 +42,7 @@ InDevelopmentWarning::InDevelopmentWarning(QWidget* parent)
QCommandLinkButton* btn_dolphinwx = new QCommandLinkButton(
tr("Run DolphinWX Instead"), tr("Recommended for normal users"), container);
QCommandLinkButton* btn_run = new QCommandLinkButton(tr("Use DolphinQt Anyway"), container);
+ QCheckBox* hide_future = new QCheckBox(tr("Don't show me this warning again"));
container->setForegroundRole(QPalette::Text);
container->setBackgroundRole(QPalette::Base);
@@ -87,12 +90,15 @@ InDevelopmentWarning::InDevelopmentWarning(QWidget* parent)
connect(btn_run, &QCommandLinkButton::clicked, this, [this](bool) { accept(); });
connect(std_buttons->button(QDialogButtonBox::Cancel), &QPushButton::clicked, this,
[this](bool) { reject(); });
+ connect(hide_future, &QCheckBox::toggled,
+ [](bool hide) { SConfig::GetInstance().m_show_development_warning = !hide; });
QVBoxLayout* body_column = new QVBoxLayout();
body_column->addWidget(heading);
body_column->addWidget(body);
body_column->addWidget(btn_dolphinwx);
body_column->addWidget(btn_run);
+ body_column->addWidget(hide_future);
body_column->setMargin(0);
body_column->setSpacing(10);