Qt: Remove in-development warning
This commit is contained in:
parent
50588034ba
commit
44ce78c969
|
@ -170,7 +170,6 @@ void SConfig::SaveInterfaceSettings(IniFile& ini)
|
||||||
interface->Set("ExtendedFPSInfo", m_InterfaceExtendedFPSInfo);
|
interface->Set("ExtendedFPSInfo", m_InterfaceExtendedFPSInfo);
|
||||||
interface->Set("ShowActiveTitle", m_show_active_title);
|
interface->Set("ShowActiveTitle", m_show_active_title);
|
||||||
interface->Set("UseBuiltinTitleDatabase", m_use_builtin_title_database);
|
interface->Set("UseBuiltinTitleDatabase", m_use_builtin_title_database);
|
||||||
interface->Set("ShowDevelopmentWarning", m_show_development_warning);
|
|
||||||
interface->Set("ThemeName", theme_name);
|
interface->Set("ThemeName", theme_name);
|
||||||
interface->Set("PauseOnFocusLost", m_PauseOnFocusLost);
|
interface->Set("PauseOnFocusLost", m_PauseOnFocusLost);
|
||||||
interface->Set("DisableTooltips", m_DisableTooltips);
|
interface->Set("DisableTooltips", m_DisableTooltips);
|
||||||
|
@ -449,7 +448,6 @@ void SConfig::LoadInterfaceSettings(IniFile& ini)
|
||||||
interface->Get("ExtendedFPSInfo", &m_InterfaceExtendedFPSInfo, false);
|
interface->Get("ExtendedFPSInfo", &m_InterfaceExtendedFPSInfo, false);
|
||||||
interface->Get("ShowActiveTitle", &m_show_active_title, true);
|
interface->Get("ShowActiveTitle", &m_show_active_title, true);
|
||||||
interface->Get("UseBuiltinTitleDatabase", &m_use_builtin_title_database, true);
|
interface->Get("UseBuiltinTitleDatabase", &m_use_builtin_title_database, true);
|
||||||
interface->Get("ShowDevelopmentWarning", &m_show_development_warning, true);
|
|
||||||
interface->Get("ThemeName", &theme_name, DEFAULT_THEME_DIR);
|
interface->Get("ThemeName", &theme_name, DEFAULT_THEME_DIR);
|
||||||
interface->Get("PauseOnFocusLost", &m_PauseOnFocusLost, false);
|
interface->Get("PauseOnFocusLost", &m_PauseOnFocusLost, false);
|
||||||
interface->Get("DisableTooltips", &m_DisableTooltips, false);
|
interface->Get("DisableTooltips", &m_DisableTooltips, false);
|
||||||
|
|
|
@ -243,7 +243,6 @@ struct SConfig
|
||||||
bool m_InterfaceExtendedFPSInfo;
|
bool m_InterfaceExtendedFPSInfo;
|
||||||
bool m_show_active_title = false;
|
bool m_show_active_title = false;
|
||||||
bool m_use_builtin_title_database = true;
|
bool m_use_builtin_title_database = true;
|
||||||
bool m_show_development_warning;
|
|
||||||
|
|
||||||
bool m_ListDrives;
|
bool m_ListDrives;
|
||||||
bool m_ListWad;
|
bool m_ListWad;
|
||||||
|
|
|
@ -21,7 +21,6 @@ set(SRCS
|
||||||
FIFOPlayerWindow.cpp
|
FIFOPlayerWindow.cpp
|
||||||
HotkeyScheduler.cpp
|
HotkeyScheduler.cpp
|
||||||
Host.cpp
|
Host.cpp
|
||||||
InDevelopmentWarning.cpp
|
|
||||||
Main.cpp
|
Main.cpp
|
||||||
MainWindow.cpp
|
MainWindow.cpp
|
||||||
MenuBar.cpp
|
MenuBar.cpp
|
||||||
|
|
|
@ -106,7 +106,6 @@
|
||||||
<QtMoc Include="GameList\ListProxyModel.h" />
|
<QtMoc Include="GameList\ListProxyModel.h" />
|
||||||
<QtMoc Include="Host.h" />
|
<QtMoc Include="Host.h" />
|
||||||
<QtMoc Include="HotkeyScheduler.h" />
|
<QtMoc Include="HotkeyScheduler.h" />
|
||||||
<QtMoc Include="InDevelopmentWarning.h" />
|
|
||||||
<QtMoc Include="Settings\InterfacePane.h" />
|
<QtMoc Include="Settings\InterfacePane.h" />
|
||||||
<QtMoc Include="Settings\AudioPane.h" />
|
<QtMoc Include="Settings\AudioPane.h" />
|
||||||
<QtMoc Include="Settings\WiiPane.h" />
|
<QtMoc Include="Settings\WiiPane.h" />
|
||||||
|
@ -166,7 +165,6 @@
|
||||||
<ClCompile Include="$(QtMocOutPrefix)HacksWidget.cpp" />
|
<ClCompile Include="$(QtMocOutPrefix)HacksWidget.cpp" />
|
||||||
<ClCompile Include="$(QtMocOutPrefix)Host.cpp" />
|
<ClCompile Include="$(QtMocOutPrefix)Host.cpp" />
|
||||||
<ClCompile Include="$(QtMocOutPrefix)HotkeyScheduler.cpp" />
|
<ClCompile Include="$(QtMocOutPrefix)HotkeyScheduler.cpp" />
|
||||||
<ClCompile Include="$(QtMocOutPrefix)InDevelopmentWarning.cpp" />
|
|
||||||
<ClCompile Include="$(QtMocOutPrefix)InfoWidget.cpp" />
|
<ClCompile Include="$(QtMocOutPrefix)InfoWidget.cpp" />
|
||||||
<ClCompile Include="$(QtMocOutPrefix)InterfacePane.cpp" />
|
<ClCompile Include="$(QtMocOutPrefix)InterfacePane.cpp" />
|
||||||
<ClCompile Include="$(QtMocOutPrefix)IOWindow.cpp" />
|
<ClCompile Include="$(QtMocOutPrefix)IOWindow.cpp" />
|
||||||
|
@ -264,7 +262,6 @@
|
||||||
<ClCompile Include="GameList\ListProxyModel.cpp" />
|
<ClCompile Include="GameList\ListProxyModel.cpp" />
|
||||||
<ClCompile Include="HotkeyScheduler.cpp" />
|
<ClCompile Include="HotkeyScheduler.cpp" />
|
||||||
<ClCompile Include="Host.cpp" />
|
<ClCompile Include="Host.cpp" />
|
||||||
<ClCompile Include="InDevelopmentWarning.cpp" />
|
|
||||||
<ClCompile Include="Main.cpp" />
|
<ClCompile Include="Main.cpp" />
|
||||||
<ClCompile Include="MainWindow.cpp" />
|
<ClCompile Include="MainWindow.cpp" />
|
||||||
<ClCompile Include="MenuBar.cpp" />
|
<ClCompile Include="MenuBar.cpp" />
|
||||||
|
|
|
@ -1,124 +0,0 @@
|
||||||
// Copyright 2016 Dolphin Emulator Project
|
|
||||||
// Licensed under GPLv2+
|
|
||||||
// Refer to the license.txt file included.
|
|
||||||
|
|
||||||
#include <QApplication>
|
|
||||||
#include <QBoxLayout>
|
|
||||||
#include <QCheckBox>
|
|
||||||
#include <QCommandLinkButton>
|
|
||||||
#include <QDialogButtonBox>
|
|
||||||
#include <QFileInfo>
|
|
||||||
#include <QLabel>
|
|
||||||
#include <QMessageBox>
|
|
||||||
#include <QProcess>
|
|
||||||
#include <QStyle>
|
|
||||||
|
|
||||||
#include "Core/ConfigManager.h"
|
|
||||||
#include "DolphinQt2/InDevelopmentWarning.h"
|
|
||||||
#include "DolphinQt2/Resources.h"
|
|
||||||
|
|
||||||
static bool LaunchDolphinWX()
|
|
||||||
{
|
|
||||||
QFileInfo file_info;
|
|
||||||
for (auto path : {"/Dolphin.exe", "/dolphin-emu", "/Dolphin"})
|
|
||||||
{
|
|
||||||
file_info.setFile(qApp->applicationDirPath() + QString::fromUtf8(path));
|
|
||||||
if (file_info.isExecutable())
|
|
||||||
return QProcess::startDetached(file_info.absoluteFilePath(), {});
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
InDevelopmentWarning::InDevelopmentWarning(QWidget* parent)
|
|
||||||
: QDialog(parent, Qt::WindowSystemMenuHint | Qt::WindowTitleHint | Qt::WindowCloseButtonHint)
|
|
||||||
{
|
|
||||||
QWidget* container = new QWidget(this);
|
|
||||||
QDialogButtonBox* std_buttons =
|
|
||||||
new QDialogButtonBox(QDialogButtonBox::Cancel, Qt::Horizontal, this);
|
|
||||||
QLabel* heading = new QLabel(container);
|
|
||||||
QLabel* icon = new QLabel(container);
|
|
||||||
QLabel* body = new QLabel(container);
|
|
||||||
|
|
||||||
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);
|
|
||||||
container->setAutoFillBackground(true);
|
|
||||||
|
|
||||||
std_buttons->setContentsMargins(10, 0, 10, 0);
|
|
||||||
|
|
||||||
QFont heading_font{heading->font()};
|
|
||||||
heading_font.setPointSizeF(heading_font.pointSizeF() * 1.5);
|
|
||||||
heading->setFont(heading_font);
|
|
||||||
heading->setText(tr("DolphinQt Experimental GUI"));
|
|
||||||
heading->setForegroundRole(QPalette::Text);
|
|
||||||
heading->setAlignment(Qt::AlignTop | Qt::AlignLeft);
|
|
||||||
heading->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Fixed);
|
|
||||||
|
|
||||||
icon->setPixmap(style()->standardPixmap(QStyle::SP_MessageBoxWarning, nullptr, this));
|
|
||||||
icon->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
|
|
||||||
|
|
||||||
QString body_text = tr(
|
|
||||||
"<p>DolphinQt is a new experimental GUI that is intended to replace "
|
|
||||||
"the current GUI based on wxWidgets. The implementation is <b>currently "
|
|
||||||
"incomplete</b> so some functionality (like changing certain settings) may be missing.</p>\n"
|
|
||||||
"<p>Only developers working on the DolphinQt implementation and curious testers should use "
|
|
||||||
"it at "
|
|
||||||
"the present time; normal users are recommended to continue using the "
|
|
||||||
"older DolphinWX GUI for the time being.</p>\n"
|
|
||||||
"<h3>Bug Reports</h3><p>At the current time there is no point making bug reports "
|
|
||||||
"about DolphinQt GUI's missing features as the developers are already aware of those.</p>\n");
|
|
||||||
body->setText(body_text);
|
|
||||||
body->setWordWrap(true);
|
|
||||||
body->setForegroundRole(QPalette::Text);
|
|
||||||
body->setAlignment(Qt::AlignTop | Qt::AlignLeft);
|
|
||||||
body->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding);
|
|
||||||
body->setMinimumWidth(QFontMetrics(body->font()).averageCharWidth() * 76);
|
|
||||||
|
|
||||||
btn_dolphinwx->setDefault(true);
|
|
||||||
|
|
||||||
connect(btn_dolphinwx, &QCommandLinkButton::clicked, this, [this](bool) {
|
|
||||||
if (!LaunchDolphinWX())
|
|
||||||
QMessageBox::critical(
|
|
||||||
this, tr("Failed to launch"),
|
|
||||||
tr("Could not start DolphinWX. Check for dolphin.exe in the installation directory."));
|
|
||||||
reject();
|
|
||||||
});
|
|
||||||
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);
|
|
||||||
|
|
||||||
QHBoxLayout* icon_layout = new QHBoxLayout(container);
|
|
||||||
icon_layout->addWidget(icon, 0, Qt::AlignTop);
|
|
||||||
icon_layout->addLayout(body_column);
|
|
||||||
icon_layout->setContentsMargins(15, 10, 10, 10);
|
|
||||||
icon_layout->setSpacing(15);
|
|
||||||
|
|
||||||
QVBoxLayout* top_layout = new QVBoxLayout(this);
|
|
||||||
top_layout->addWidget(container);
|
|
||||||
top_layout->addWidget(std_buttons);
|
|
||||||
top_layout->setSpacing(10);
|
|
||||||
top_layout->setContentsMargins(0, 0, 0, 10);
|
|
||||||
top_layout->setSizeConstraint(QLayout::SetMinimumSize);
|
|
||||||
|
|
||||||
setWindowIcon(Resources::GetMisc(Resources::LOGO_SMALL));
|
|
||||||
setWindowTitle(tr("DolphinQt2 Experimental GUI"));
|
|
||||||
}
|
|
||||||
|
|
||||||
InDevelopmentWarning::~InDevelopmentWarning()
|
|
||||||
{
|
|
||||||
}
|
|
|
@ -1,16 +0,0 @@
|
||||||
// Copyright 2016 Dolphin Emulator Project
|
|
||||||
// Licensed under GPLv2+
|
|
||||||
// Refer to the license.txt file included.
|
|
||||||
|
|
||||||
#pragma once
|
|
||||||
|
|
||||||
#include <QDialog>
|
|
||||||
|
|
||||||
class InDevelopmentWarning final : public QDialog
|
|
||||||
{
|
|
||||||
Q_OBJECT
|
|
||||||
|
|
||||||
public:
|
|
||||||
explicit InDevelopmentWarning(QWidget* parent = nullptr);
|
|
||||||
~InDevelopmentWarning();
|
|
||||||
};
|
|
|
@ -14,7 +14,6 @@
|
||||||
#include "Core/BootManager.h"
|
#include "Core/BootManager.h"
|
||||||
#include "Core/Core.h"
|
#include "Core/Core.h"
|
||||||
#include "DolphinQt2/Host.h"
|
#include "DolphinQt2/Host.h"
|
||||||
#include "DolphinQt2/InDevelopmentWarning.h"
|
|
||||||
#include "DolphinQt2/MainWindow.h"
|
#include "DolphinQt2/MainWindow.h"
|
||||||
#include "DolphinQt2/QtUtils/RunOnObject.h"
|
#include "DolphinQt2/QtUtils/RunOnObject.h"
|
||||||
#include "DolphinQt2/Resources.h"
|
#include "DolphinQt2/Resources.h"
|
||||||
|
@ -111,11 +110,6 @@ int main(int argc, char* argv[])
|
||||||
|
|
||||||
int retval = 0;
|
int retval = 0;
|
||||||
|
|
||||||
if (SConfig::GetInstance().m_show_development_warning)
|
|
||||||
{
|
|
||||||
InDevelopmentWarning warning_box;
|
|
||||||
retval = warning_box.exec() == QDialog::Rejected;
|
|
||||||
}
|
|
||||||
if (!retval)
|
if (!retval)
|
||||||
{
|
{
|
||||||
DolphinAnalytics::Instance()->ReportDolphinStart("qt");
|
DolphinAnalytics::Instance()->ReportDolphinStart("qt");
|
||||||
|
|
Loading…
Reference in New Issue