From 226d1711c08bd0fecbf2576c6430afb5b9443db1 Mon Sep 17 00:00:00 2001 From: Patrizio Bekerle Date: Mon, 1 Jan 2024 15:54:48 +0100 Subject: [PATCH] #2937 fix: possible crash on certain systems at startup after the script update check --- CHANGELOG.md | 4 +++ src/dialogs/scriptrepositorydialog.cpp | 6 +++- src/mainwindow.cpp | 39 ++++++++++++++------------ 3 files changed, 30 insertions(+), 19 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 69377e5d84..8660238d16 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # QOwnNotes Changelog +## 24.1.1 +- a crash on certain systems at startup after the script update check was fixed + (for [#2937](https://github.com/pbek/QOwnNotes/issues/2937)) + ## 24.1.0 - the script update check at startup now runs in a separate thread to not block the application startup (for [#2934](https://github.com/pbek/QOwnNotes/issues/2934)) diff --git a/src/dialogs/scriptrepositorydialog.cpp b/src/dialogs/scriptrepositorydialog.cpp index aa5b6ddea9..c2b937a7df 100644 --- a/src/dialogs/scriptrepositorydialog.cpp +++ b/src/dialogs/scriptrepositorydialog.cpp @@ -74,6 +74,7 @@ bool ScriptRepositoryDialog::loadScriptRepositoryMetaData() { QUrl("https://github.com/qownnotes/scripts/releases/download/metadata-index/index.json"); int statusCode; + // This should have a 10-second timeout auto arr = Utils::Misc::downloadUrlWithStatusCode(url, statusCode); if (statusCode != 200) { @@ -158,8 +159,11 @@ void ScriptRepositoryDialog::searchForUpdatesForScripts(const QList