[Scummvm-git-logs] scummvm branch-2-8 -> e06a018ac2cf4dfa2b0865332c750af2207d29b0
lephilousophe
noreply at scummvm.org
Sun Dec 10 10:47:47 UTC 2023
This automated email contains information about 3 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
0d6ea3592f BACKENDS: NETWORKING: Properly handle request abortion
60621264c6 GUI: Cancel pending requests when clearing cache
e06a018ac2 GUI: Clear error when starting an new state when downloading
Commit: 0d6ea3592fa4f69136a2f4a7dc8effd231685793
https://github.com/scummvm/scummvm/commit/0d6ea3592fa4f69136a2f4a7dc8effd231685793
Author: Le Philousophe (lephilousophe at users.noreply.github.com)
Date: 2023-12-10T11:44:22+01:00
Commit Message:
BACKENDS: NETWORKING: Properly handle request abortion
Finish the request with an error.
Remove a useless check as handle is never called when state is not
PROCESSING
Changed paths:
backends/networking/curl/sessionrequest.cpp
diff --git a/backends/networking/curl/sessionrequest.cpp b/backends/networking/curl/sessionrequest.cpp
index 75b72a136fb..8633fccc3aa 100644
--- a/backends/networking/curl/sessionrequest.cpp
+++ b/backends/networking/curl/sessionrequest.cpp
@@ -153,9 +153,7 @@ void SessionRequest::reuse(const Common::String &url, const Common::String &loca
}
void SessionRequest::handle() {
- if (_state != PROCESSING) {
- return;
- }
+ // This is called by ConnMan when state is PROCESSING
if (!_stream) _stream = makeStream();
@@ -225,7 +223,8 @@ void SessionRequest::close() {
}
void SessionRequest::abortRequest() {
- _state = FINISHED;
+ ErrorResponse error(this, false, true, Common::String::format("Aborted"), -1);
+ finishError(error);
if (_localFile) {
_localFile->close();
Commit: 60621264c6a2284c6046bd7c39ed3176fa6bb00b
https://github.com/scummvm/scummvm/commit/60621264c6a2284c6046bd7c39ed3176fa6bb00b
Author: Le Philousophe (lephilousophe at users.noreply.github.com)
Date: 2023-12-10T11:44:59+01:00
Commit Message:
GUI: Cancel pending requests when clearing cache
And properly restart a file list download
Changed paths:
gui/downloadpacksdialog.cpp
diff --git a/gui/downloadpacksdialog.cpp b/gui/downloadpacksdialog.cpp
index 66f445e815b..979e108326a 100644
--- a/gui/downloadpacksdialog.cpp
+++ b/gui/downloadpacksdialog.cpp
@@ -462,6 +462,8 @@ void DownloadPacksDialog::clearCache() {
GUI::MessageDialog dialog(Common::U32String::format(_("You are about to remove %s %S of data, deleting all previously downloaded %S. Do you want to proceed?"), size.c_str(), _(sizeUnits).c_str(), _packname.c_str()), _("Proceed"), _("Cancel"));
if (dialog.runModal() == ::GUI::kMessageOK) {
+ // Cancel all downloads
+ g_state->session.abortRequest();
// Build list of previously downloaded icon files
for (auto ic = iconFiles.begin(); ic != iconFiles.end(); ++ic) {
@@ -476,9 +478,11 @@ void DownloadPacksDialog::clearCache() {
g_state->fileHash.clear();
// Fetch current packs list file and re-trigger downloads
- g_state->downloadList();
- calculateList();
+ setState(kDownloadStateList);
_cancelButton->setVisible(true);
+ refreshWidgets();
+
+ g_state->downloadList();
} else {
_clearCacheButton->setEnabled(true);
}
Commit: e06a018ac2cf4dfa2b0865332c750af2207d29b0
https://github.com/scummvm/scummvm/commit/e06a018ac2cf4dfa2b0865332c750af2207d29b0
Author: Le Philousophe (lephilousophe at users.noreply.github.com)
Date: 2023-12-10T11:45:05+01:00
Commit Message:
GUI: Clear error when starting an new state when downloading
Changed paths:
gui/downloadpacksdialog.cpp
diff --git a/gui/downloadpacksdialog.cpp b/gui/downloadpacksdialog.cpp
index 979e108326a..228f7a0baf4 100644
--- a/gui/downloadpacksdialog.cpp
+++ b/gui/downloadpacksdialog.cpp
@@ -237,6 +237,7 @@ void DownloadPacksDialog::close() {
void DownloadPacksDialog::setState(IconProcessState state) {
g_state->state = state;
+ _errorText->setLabel(Common::U32String());
switch (state) {
case kDownloadStateNone:
More information about the Scummvm-git-logs
mailing list