Qt: Ensure build warning is themed
This commit is contained in:
parent
4ce1b1afed
commit
cb10c6fbf4
|
@ -114,7 +114,7 @@ bool AutoUpdaterDialog::isOfficialBuild()
|
|||
#endif
|
||||
}
|
||||
|
||||
bool AutoUpdaterDialog::warnAboutUnofficialBuild()
|
||||
void AutoUpdaterDialog::warnAboutUnofficialBuild()
|
||||
{
|
||||
//
|
||||
// To those distributing their own builds or packages of DuckStation, and seeing this message:
|
||||
|
@ -144,7 +144,7 @@ bool AutoUpdaterDialog::warnAboutUnofficialBuild()
|
|||
#endif
|
||||
Host::GetBaseBoolSettingValue(CONFIG_SECTION, CONFIG_KEY, false))
|
||||
{
|
||||
return true;
|
||||
return;
|
||||
}
|
||||
|
||||
constexpr int DELAY_SECONDS = 5;
|
||||
|
@ -197,15 +197,12 @@ bool AutoUpdaterDialog::warnAboutUnofficialBuild()
|
|||
if (mbox.exec() == QMessageBox::Yes)
|
||||
{
|
||||
QtUtils::OpenURL(nullptr, "https://duckstation.org/");
|
||||
return false;
|
||||
QMetaObject::invokeMethod(qApp, &QApplication::quit, Qt::QueuedConnection);
|
||||
return;
|
||||
}
|
||||
|
||||
if (cb->isChecked())
|
||||
Host::SetBaseBoolSettingValue(CONFIG_SECTION, CONFIG_KEY, true);
|
||||
|
||||
return true;
|
||||
#else
|
||||
return true;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
|
@ -34,7 +34,7 @@ public:
|
|||
static std::string getDefaultTag();
|
||||
static void cleanupAfterUpdate();
|
||||
static bool isOfficialBuild();
|
||||
static bool warnAboutUnofficialBuild();
|
||||
static void warnAboutUnofficialBuild();
|
||||
|
||||
Q_SIGNALS:
|
||||
void updateCheckCompleted();
|
||||
|
|
|
@ -2918,9 +2918,6 @@ int main(int argc, char* argv[])
|
|||
if (!QtHost::ParseCommandLineParametersAndInitializeConfig(app, autoboot))
|
||||
return EXIT_FAILURE;
|
||||
|
||||
if (!AutoUpdaterDialog::warnAboutUnofficialBuild())
|
||||
return EXIT_FAILURE;
|
||||
|
||||
if (!QtHost::EarlyProcessStartup())
|
||||
return EXIT_FAILURE;
|
||||
|
||||
|
@ -2931,6 +2928,9 @@ int main(int argc, char* argv[])
|
|||
// Set theme before creating any windows.
|
||||
QtHost::UpdateApplicationTheme();
|
||||
|
||||
// Build warning.
|
||||
AutoUpdaterDialog::warnAboutUnofficialBuild();
|
||||
|
||||
// Start logging early.
|
||||
LogWindow::updateSettings();
|
||||
|
||||
|
|
Loading…
Reference in New Issue