aboutsummaryrefslogtreecommitdiff
path: root/lib/jobs
AgeCommit message (Collapse)Author
2020-05-12basejob.cpp: nitpicks from clang-formatKitsune Ral
2020-04-14BaseJob::makeRequestUrl(): even more tolerance to slash separatorsKitsune Ral
The code is really defensive now, making sure there's exactly one slash between the base path and the endpoint. It's still very conservative about the path composition otherwise (no normalisation etc.).
2020-04-07BaseJob: don't finish and re-try at the same timeKitsune Ral
Due to a missing return statement, a retry with auth case led to the job being finished and pending at the same time, with no good consequences.
2020-04-06BaseJob: disable pipeliningKitsune Ral
Longer running on RHEL/CentOS 8 leads to crashes that no more occur with disabled pipelining.
2020-04-06Revert changes accidentally sneaked in with the previous commitKitsune Ral
2020-04-06CMakeLists: install header files to a subdirectoryKitsune Ral
This is a Quotient part of #328 fix; QtOlm part is pending.
2020-04-05RequestData: create empty QByteArray by defaultKitsune Ral
May fix #380. Also: remove explicit copying disablers, the unique_ptr<> member disables copying just fine.
2020-03-30BaseJob: check the connection even harderKitsune Ral
2020-03-30BaseJob: shutdown timers on abandoning and destructionKitsune Ral
A part of the fix for #398.
2019-12-12BaseJob::initiate(): fix nullptr dereferencingKitsune Ral
2019-12-12BaseJob: prepare() -> initiate() + refactoring around itKitsune Ral
* BaseJob::initiate() now calls ConnectionData::submit() without relying on Connection to do that * ConnectionData::submit() is now the only site where a job enters Pending state * No more shortcuts to BaseJob::sendRequest(), even retries are sent through the ConnectionData submission queue * Additional validation in BaseJob::initiate() that the request data device is actually open (because QtNetwork API officially requires that, even if you can get away passing a closed QBuffer to it)
2019-12-12Move FileError definition from DownloadFileJob to BaseJobKitsune Ral
Will use it in BaseJob in a later commit.
2019-12-12RequestData: optimise fromData() and preopen the bufferKitsune Ral
It was just a coincidence that QBuffer allowed reading from it without being isReadable() at the moment of starting a job.
2019-12-11BaseJob::StatusCode: offset first error from ErrorLevelKitsune Ral
Q_ENUM seems to resolve int to the first enum identifier with that value so NetworkError == ErrorLevel looks confusing in logs.
2019-11-19BaseJob: Don't send accessToken if not needed; send again on 401Kitsune Ral
The first part closes #358; the second part is a workaround for non-standard cases when endpoints without security by the spec turn out to be secured (in particular, the case of authenticating media servers).
2019-10-20Qualify types in signals and Q_INVOKABLEsKitsune Ral
Because https://doc.qt.io/qt-5/moc.html#limitations . For direct connections that doesn't matter but it very much does for queued ones. Along with this DirectChatsMap and IgnoredUsersList have been moved from Connection:: to Quotient::.
2019-10-02BaseJob::Private: experiment with [[nodiscard]]Kitsune Ral
2019-10-02More fixes for Apple not having deduction guides in stdlibKitsune Ral
2019-09-29BaseJob, urlForLog() -> dumpRequest(): include HTTP verb into log linesKitsune Ral
2019-09-29Rename pieces with qmc/qmatrixclientKitsune Ral
2019-08-27More compliant 'using' for chrono_literalsKitsune Ral
Compilers warn on using 'using ...::operator""s' because they think we're redefining the reserved suffix.
2019-08-27Don't use enumerator attributesKitsune Ral
Anything after enumerators is a problem for moc before Qt 5.12; so we can't use enumerator attributes before then.
2019-08-20BaseJob/ConnectionData: connection-wide rate-limitingKitsune Ral
As before, completely transparent for clients, driven by 529 errors from the server (but cases of rate limiting are signalled by BaseJob::rateLimited). That brings changes to BaseJob API: timeouts now use int64_t and also can be handled in std::chrono terms; aboutToStart() -> aboutToSendRequest(); started() -> sentRequest(). Closes #292.
2019-08-20BaseJob: Status/StatusCode tweaks, cleanup, mo' commentsKitsune Ral
Notably, recovered Status::fromHttpCode() that was introduced in 5722ceaf4bd10c29f1091e3dc5a87f5650ea8c71 but fell victim of a careless merge (so much for introducing non-topical changes in feature branches).
2019-08-16BaseJob: support M_USER_DEACTIVATED error codeKitsune Ral
Closes #344.
2019-08-13Support for server notices rooms (MSC1452)Kitsune Ral
Closes #326.
2019-08-09Namespace: QMatrixClient -> Quotient (with back comp alias)Kitsune Ral
2019-08-09Rename zero-impact stringsKitsune Ral
2019-08-02Apply the new brace wrapping to source filesKitsune Ral
2019-08-02Merge branch 'master' into use-clang-formatKitsune Ral
2019-07-12Minor polishKitsune Ral
2019-07-09Merge branch 'master' into use-clang-formatKitsune Ral
2019-07-01Merge branch 'master' into forget-rooms-reallyKitsune Ral
2019-07-01Handle M_UNKNOWN as The Spec says; factor out BaseJob::parseError()Kitsune Ral
2019-06-26BaseJob::Status: fromHttpCodeKitsune Ral
2019-06-24Merge branch 'master' into clang-formatKitsune Ral
# Conflicts: # CMakeLists.txt # lib/avatar.cpp # lib/connection.cpp # lib/connection.h # lib/connectiondata.cpp # lib/csapi/account-data.cpp # lib/csapi/account-data.h # lib/csapi/capabilities.cpp # lib/csapi/capabilities.h # lib/csapi/content-repo.cpp # lib/csapi/create_room.cpp # lib/csapi/filter.cpp # lib/csapi/joining.cpp # lib/csapi/keys.cpp # lib/csapi/list_joined_rooms.cpp # lib/csapi/notifications.cpp # lib/csapi/openid.cpp # lib/csapi/presence.cpp # lib/csapi/pushrules.cpp # lib/csapi/registration.cpp # lib/csapi/room_upgrades.cpp # lib/csapi/room_upgrades.h # lib/csapi/search.cpp # lib/csapi/users.cpp # lib/csapi/versions.cpp # lib/csapi/whoami.cpp # lib/csapi/{{base}}.cpp.mustache # lib/events/accountdataevents.h # lib/events/eventcontent.h # lib/events/roommemberevent.cpp # lib/events/stateevent.cpp # lib/jobs/basejob.cpp # lib/jobs/basejob.h # lib/networkaccessmanager.cpp # lib/networksettings.cpp # lib/room.cpp # lib/room.h # lib/settings.cpp # lib/settings.h # lib/syncdata.cpp # lib/user.cpp # lib/user.h # lib/util.cpp
2019-06-07BaseJob::StatusCode: add Error-less synonyms; officially deprecate ↵Kitsune Ral
JsonParseError
2019-05-31Ignore some errors on leaving rooms, add new error enum. Fixes #307Ville Ranki
2019-04-24BaseJob: preserve the calculated error code if JSON error code is unknownKitsune Ral
Resetting the code to IncorrectRequestError has been a part of the cause for the incorrect Quaternion behaviour on expired tokens.
2019-04-24BaseJob: fix a possible crash upon logoutKitsune Ral
See https://github.com/QMatrixClient/Quaternion/issues/566 for details.
2019-04-06Clean up on clang-tidy/clazy analysisKitsune Ral
2019-03-14Fix read receipts and redactions on v3 roomsKitsune Ral
Previously slashes in eventIds (that come plenty in v3 due to base64 encoding) were not properly encoded - they are now.
2019-03-02style: apply .clang-format to all .cpp and .h filesMarc Deop
2019-02-27BaseJob::abandon() fixesKitsune Ral
1. It should work with non-started jobs now (Closes #289). 2. It should allow clients to still handle `finished()` instead of cutting them off right before emitting the signal.
2019-02-20BaseJob: M_UNSUPPORTED_ROOM_VERSION & M_INCOMPATIBLE_ROOM_VERSIONKitsune Ral
2018-12-24Clarify doc-comment for BaseJob::finished a bitKitsune Ral
[skip ci]
2018-12-08SyncJob: accept Filter instead of QString for the filterKitsune Ral
2018-11-20SyncJob::parseJson: fix a validation mistakeKitsune Ral
2018-11-20Make SyncData more self-contained and prepare for cache splittingKitsune Ral
SyncData now resides in its own pair of files and is capable to load either from file or from JSON. There is also (yet untested) capability to load rooms from files if a file name stands is the value for a given room id. This allows to store the master cache file separately from cache files for each room, massively easing the problem of bulky accounts that can overflow the poor capacity of Qt's JSON engine.
2018-11-19BaseJob::rawDataSample()Kitsune Ral
A new recommended (and localisable) way of getting a piece of raw response to display next to error messages as "details". BaseJob::rawData() returns exactly the trimmed piece of data, no "truncated" suffix there anymore.