Edit main.cpp

This commit is contained in:
collecting
2025-09-24 04:35:09 +00:00
parent af223e445f
commit 4ec8ddbcf7

View File

@@ -5465,7 +5465,7 @@ int main(int argc, char* argv[]) {
// Tell the bundled OpenSSL where to find the bundled certificates.
const QDir app_dir(QCoreApplication::applicationDirPath());
const QString certs_path = app_dir.filePath("../etc/ssl/certs");
const QString certs_path = app_dir.filePath(QString::fromLatin1("../etc/ssl/certs"));
qputenv("SSL_CERT_DIR", certs_path.toUtf8());
}
@@ -5535,6 +5535,7 @@ int main(int argc, char* argv[]) {
QApplication app(argc, argv);
#ifdef CITRON_USE_AUTO_UPDATER
// Check for and apply staged updates before starting the main application
std::filesystem::path app_dir = std::filesystem::path(QCoreApplication::applicationDirPath().toStdString());
if (Updater::UpdaterService::HasStagedUpdate(app_dir)) {
@@ -5544,6 +5545,7 @@ int main(int argc, char* argv[]) {
QObject::tr("Citron has been updated successfully!"));
}
}
#endif
#ifdef _WIN32
OverrideWindowsFont();
@@ -5594,6 +5596,7 @@ void GMainWindow::OnCheckForUpdates() {
}
void GMainWindow::CheckForUpdatesAutomatically() {
#ifdef CITRON_USE_AUTO_UPDATER
// Check if automatic updates are enabled
if (!Settings::values.enable_auto_update_check.GetValue()) {
return;
@@ -5633,6 +5636,7 @@ void GMainWindow::CheckForUpdatesAutomatically() {
// Start the silent update check
updater_service->CheckForUpdates(update_url);
#endif
}
void GMainWindow::OnToggleGridView() {