aboutsummaryrefslogtreecommitdiff
path: root/lib/jobs/downloadfilejob.cpp
diff options
context:
space:
mode:
authorKitsune Ral <Kitsune-Ral@users.sf.net>2018-05-29 16:38:10 +0900
committerKitsune Ral <Kitsune-Ral@users.sf.net>2018-05-29 16:47:05 +0900
commite58a03c84f89a5ec9091ca81ef040df659700ef2 (patch)
tree84797022d4b5cffea17cfc4da40beb630d5709a2 /lib/jobs/downloadfilejob.cpp
parenta677a3443fda9f77e893d448a55e8d0482d3d4b0 (diff)
downloadlibquotient-e58a03c84f89a5ec9091ca81ef040df659700ef2.tar.gz
libquotient-e58a03c84f89a5ec9091ca81ef040df659700ef2.zip
BaseJob: "background" switch; more extensive error reporting
Running a request in background, aside from some tweaks on the network layer (see QNetworkRequest::BackgroundRequestAttribute), allows to distinguish jobs not immediately caused by user interaction (such as fetching thumbnails). This can be used to show or not show certain notifications in UI of clients. Error reporting has been extended with more methods: errorCaption() - a human-readable phrase calculated from the status code; intended to be shown as a dialog caption and in similar situations. errorRawData() - former errorDetails(), returns the raw response from the server. errorUrl() - returns a URL that may be useful with the error (e.g. for the upcoming "consent not given" error, this will have the policy URL). Connection::resultFailed() - a new signal emitted when _any_ BaseJob::failure() is emitted (enables centralised error handling across all network requests in clients). As a part of matching changes in Connection, callApi has an overload that allows to specify the policy; a custom enum instead of bool has been chosen for the parameter type, to avoid clashes with (arbitrary) types of job parameters.
Diffstat (limited to 'lib/jobs/downloadfilejob.cpp')
0 files changed, 0 insertions, 0 deletions