aboutsummaryrefslogtreecommitdiff
path: root/lib
AgeCommit message (Collapse)Author
2020-06-12BaseJob: fail early if the job needs token and there's noneKitsune Ral
2020-06-12Connection: add (STORED false) to derived Q_PROPERTYsKitsune Ral
2020-06-11BaseJob::prepareError(): be more tolerant to empty error payloadsKitsune Ral
TooManyRequests can come without a payload, apparently.
2020-06-10syncdata.h: fix an old warning about operator<<Kitsune Ral
The warning has been that it is declared as a friend but not exactly in namespace Quotient (though all compilers still could find and link it but only as long as it is defined in the namespace). Now instead of being declared as a friend it's just declared in the namespace :)
2020-06-10Room: fix messageSent() being emitted too earlyKitsune Ral
Closes #406.
2020-06-10More comments refreshKitsune Ral
[ci skip]
2020-06-09Comments refreshKitsune Ral
[skip ci]
2020-06-09Merge pull request #405 from quotient-im/kitsune-basejob-store-json-responseKitsune Ral
Store JSON response in BaseJob + tweaks to the generated code
2020-06-07Small updates to match the new generated definitionsKitsune Ral
2020-06-07Update generated files according to gtad/* changesKitsune Ral
2020-06-07SsoSession: let Private be a class everywhereKitsune Ral
Fixes a compilation warning that Private is a struct in one place and a class in another.
2020-06-07AccountSettins: use perfect forwardingKitsune Ral
2020-06-07util.cpp: drop OptimizeOnFirstUsage option on newer QtKitsune Ral
Qt 5.12+ always optimise QRegularExpression on first usage.
2020-06-07BaseJob: jsonData() and prepareResult/Error()Kitsune Ral
* JSON response is stored internally in BaseJob, rather than passed around virtual response handlers. This allow to lazily deserialise parts of the JSON response when the client calls for them instead of deserialising upon arrival and storing POD pieces. This is incompatible with the current generated code, so temporarily FTBFS. * BaseJob::loadFromJson() and BaseJob::takeFromJson() have been added to facilitate picking parts of the result as described above in derived job classes. * BaseJob::jsonData(), BaseJob::jsonItems() and (protected) BaseJob::reply() for direct access to the response in its various forms. * To further eliminate boilerplate code in generated job classes, a group of *ExpectedKeys() methods has been added - this allows to reflect the API definition of required response keys in a more "declarative" way, delegating validation to BaseJob. * parseReply() and parseJson() pair turns to singular prepareResult(). Thanks to all the changes above, in most cases it will not need overriding, unlike before. * BaseJob::Private::parseJson() is introduced, to wrap QJsonDocument::parseJson() into something less verbose. This serves a completely different purpose to the former BaseJob::parseJson(). * BaseJob::doCheckReply() takes the place, and the name, of checkReply().
2020-06-07MediaThumbnailJob: be specific about the transformKitsune Ral
What's needed for a thumbnail is normally "scale", not "crop" (as these are defined in The Spec).
2020-06-07BaseJob: expose statusCode as Q_PROPERTYKitsune Ral
2020-06-05Avoid Qt 5.15 deprecation warningKitsune Ral
operator+() is no more wanted with iterators on associative containers.
2020-06-05Use CBOR for binary JSON caching on Qt 5.15+Kitsune Ral
Qt 5.15 deprecates binary JSON format in favour of CBOR now used as a backend for its JSON classes.
2020-06-05Connection::run(): Q_INVOKABLE and chainingKitsune Ral
2020-06-01GTAD parts: new home and format updates for GTAD 0.7Kitsune Ral
All GTAD-related files (gtad.yaml and templates) from now live in their dedicated gtad/ directory - this helps against removing them accidentally along with the rest of the generated files. The format to list generated files in gtad.yaml has changed a bit before GTAD 0.7 beta2; gtad.yaml in this commit conforms to the new structure.
2020-06-01Remove the piece of code introduced too early onKitsune Ral
parseJsonDocument() will come later.
2020-05-31BaseJob: use non-deprecated API for Qt 5.15Kitsune Ral
Qt 5.15 renamed HTTP2AllowedAttribute to Http2AllowedAttribute, deprecating the old spelling.
2020-05-31BaseJob::rawData: overload for (even) quicker accessKitsune Ral
No functional changes either.
2020-05-31Move around and format codeKitsune Ral
No functional changes here.
2020-05-31room.cpp: clean away unused variablesKitsune Ral
2020-05-12basejob.cpp: nitpicks from clang-formatKitsune Ral
2020-04-17Regenerate API files using new GTAD and refreshed templatesKitsune Ral
No functional changes.
2020-04-17gtad.yaml, *.mustache: upgrade to GTAD 0.7 betaKitsune Ral
That means much more readable templates thanks to GTAD 0.7 in turn using the upgrade Mustache engine.
2020-04-15Connection: track resolving and login flows jobs; isUsable()Kitsune Ral
This is to prevent the jobs from several resolveServer() / setHomeserver() invocations running in parallel.
2020-04-15Connection: cleanup and reformatKitsune Ral
2020-04-15Connection: connectToServer -> loginWithPasswordKitsune Ral
connectToServer() is left for compatibility but deprecated.
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-14Settings: use UTF-8 encodingKitsune Ral
Fixes #403.
2020-04-14Room: emit updatedEvent() on un-reactionKitsune Ral
2020-04-12Room::safeMemberName()Kitsune Ral
Pulled from Quaternion code.
2020-04-12Room::canSwitchVersions(): refactor and make Q_INVOKABLEKitsune Ral
2020-04-08EventStatus::ReplacedKitsune Ral
This can be handy to pass the replaced status to QML.
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-07Room::addNewMessageEvents: fix an assertion failure on empty senderKitsune Ral
When a message is redacted it has no sender. If it happens to be in the bulkhead, Quotient tries to promote a read marker over it and fails on being unable to resolve the author.
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-31Reparent all jobs to their connectionsKitsune Ral
(Mostly) fixes #397. Fixes #398. If there's a need to reparent the job to some other object, it should now be done after callApi()/run() call (not that there were many touch points before that moment, anyway). Collateral damage: job-starting methods are no more const (but that didn't belong them anyway, too).
2020-03-30Connection::resolveServer(): refactorKitsune Ral
Also: use 4-arg connect() to make sure lambdas are disconnected if the connection is gone.
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.
2020-03-27Fix FTBFS with Quotient_ENABLE_E2EEKitsune Ral
2020-03-26Refactoring around Connection::onSyncSuccess()Kitsune Ral
The method grew large and a bit unwieldy over the years.
2020-03-26AliasesEventContent::toJson(): optimise generated JSONKitsune Ral