From 28adf6379c882f7a62d4ad09560ce5e3eb66219d Mon Sep 17 00:00:00 2001 From: Martin Rotter Date: Thu, 22 May 2025 08:33:37 +0200 Subject: [PATCH] survey --- CMakeLists.txt | 2 +- src/librssguard/miscellaneous/application.cpp | 22 +++++-------------- 2 files changed, 6 insertions(+), 18 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 280f56f4d..905657570 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -78,7 +78,7 @@ set(APP_AUTHOR "Martin Rotter") set(APP_COPYRIGHT "\\251 2011-${YEAR} ${APP_AUTHOR}") set(APP_REVERSE_NAME "io.github.martinrotter.rssguard") set(APP_DONATE_URL "https://github.com/sponsors/martinrotter") -set(APP_VERSION "4.8.3") +set(APP_VERSION "4.8.4") set(APP_URL "https://github.com/martinrotter/rssguard") set(APP_URL_DOCUMENTATION "https://rssguard.readthedocs.io") diff --git a/src/librssguard/miscellaneous/application.cpp b/src/librssguard/miscellaneous/application.cpp index 5391bf06f..7aeb0e960 100644 --- a/src/librssguard/miscellaneous/application.cpp +++ b/src/librssguard/miscellaneous/application.cpp @@ -331,12 +331,11 @@ void Application::performLogging(QtMsgType type, const QMessageLogContext& conte } if (!s_customLogFile.isEmpty()) { - QFile log_file(s_customLogFile); + static QFile* log_file = new QFile(s_customLogFile); - if (log_file.open(QFile::OpenModeFlag::Append | QFile::OpenModeFlag::Unbuffered)) { - log_file.write(console_message.toUtf8()); - log_file.write(QSL("\r\n").toUtf8()); - log_file.close(); + if (log_file->isOpen() || log_file->open(QFile::OpenModeFlag::Append | QFile::OpenModeFlag::Unbuffered)) { + log_file->write(console_message.toUtf8()); + log_file->write(QSL("\r\n").toUtf8()); } } @@ -374,20 +373,9 @@ void Application::loadDynamicShortcuts() { } void Application::offerPolls() const { - /* if (isFirstRunCurrentVersion()) { - qApp->showGuiMessage(Notification::Event::GeneralEvent, - {tr("%1 survey").arg(QSL(APP_NAME)), - tr("Please, fill the survey."), - QSystemTrayIcon::MessageIcon::Warning}, - {false, true, false}, - {tr("Go to survey"), [] { - qApp->web()->openUrlInExternalBrowser(QSL("https://docs.google.com/forms/d/e/" - "1FAIpQLScQ_r_EwM6qojPsIMQHGdnSktU-WGHgporN69mpU-" - "Tvq8y7XQ/viewform?usp=sf_link")); - }}); + qApp->web()->openUrlInExternalBrowser(QSL("https://forms.gle/3CZm95W6vrBLfi5K9")); } - */ } void Application::offerChanges() const {