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