aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2020-06-19Rename a few 'data' responsesKitsune Ral
2020-06-19*.h.mustache: minor fixesKitsune Ral
The Quotient:: workaround seems no more necessary.
2020-06-18gtad: restrict the identifier regexKitsune Ral
2020-06-14libquotient.pri: fix a typo leading to qmake FTBFSKitsune Ral
2020-06-14quotient_common.h for common namespace thingsKitsune Ral
The two main cases for this header file are: * namespace QMatrixClient = Quotient should occur exactly once, to respect ODR. * Q_NAMESPACE for namespace Quotient (to enable Q_ENUM_NS, particularly) must be defined exactly once, for the same reason.
2020-06-12The previous commit is incomplete, this completes itKitsune Ral
2020-06-12Connection::isLoggedIn() and more robust logout()Kitsune Ral
isLoggedIn() is just a wrapper around Connection::accessToken() that returns whether it's not empty. Now, Connection::accessToken() and Connection::logout() are changed in such a way that if there's a logout job ongoing Connection::accessToken() will return an empty value even though the access token is still stored in ConnectionData. This gives a hint to the rest of Connection and to the client code that the user is not quite authenticated anymore. Finally, syncLoop() and sync() have been altered to check isLoggedIn() before proceeding with their network request.
2020-06-12Connection::syncLoop: give a pause between syncsKitsune Ral
As it's observed now, Synapse responds almost immediately on /sync requests - even if there are no events to return. This downgrades long-polling to simply polling, and since clients don't expect it, polling loops become pretty violent. To alleviate that somehow, syncLoop now accepts the second parameter, msecBetween (500 msecs by default), to configure waiting between the previous sync response and the next sync request. This is only for syncLoop(); Connection::sync() fires instantly, as before.
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-12Merge remote-tracking branch 'origin/kitsune-conservative-configure-depends'Kitsune Ral
2020-06-12CMakeLists.txt: fix a typoKitsune Ral
2020-06-12CMakeLists.txt: fix update-api target when there's no clang-formatKitsune Ral
2020-06-11BaseJob::prepareError(): be more tolerant to empty error payloadsKitsune Ral
TooManyRequests can come without a payload, apparently.
2020-06-11CMakeLists.txt: only use CONFIGURE_DEPENDS when neededKitsune Ral
2020-06-11Merge branch 'kitsune-expand-ci'Kitsune Ral
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-10CMakeLists.txt: exclude key_backup.yaml from APIKitsune Ral
As of now, it's a bit immature for code generation. Will be reincluded once it gets better.
2020-06-10CI: test more configurationsKitsune Ral
2020-06-10libquotient.pri: set /std:c++17 explicitlyKitsune Ral
Qt 5.9's qmake only seems to use CONFIG *= c++1z for GCC/LLVM but not for MSVC.
2020-06-10Room: fix messageSent() being emitted too earlyKitsune Ral
Closes #406.
2020-06-10TestSuite::sendRedaction: fix a stale TODOKitsune Ral
Add another TODO instead :-|
2020-06-10quotest: make sure to send all events before leavingKitsune Ral
2020-06-10.travis.yml: fix a typo in the matrix-doc URLKitsune Ral
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-09Fix qmake build failure at AppVeyorKitsune Ral
Turned out libQuotient code base was not good for NMake inference rules but qmake has been intelligent enough to detect that and disable before. After the recent optimisations qmake's intelligence was not enough so CONFIG += no_batch was not automatically added, leading to the linking failure because NMake skipped compilation of all source files.
2020-06-07Small updates to match the new generated definitionsKitsune Ral
2020-06-07Travis CI: clone olm and gtad outside of source treeKitsune Ral
libQuotient now has gtad/ directory that stands in the way of cloning GTAD - which is just to emphasize that cloning other projects into the source tree has never been a good idea.
2020-06-07Update generated files according to gtad/* changesKitsune Ral
2020-06-07gtad/*: optimise and use latest GTAD featuresKitsune Ral
- The generated code is updated to be compatible with the BaseJob changes introduced in the previous commit. This includes greatly reducing the number of header files that have to be explicitly #included, as basejob.h now #includes converters.h. Also, thanks to the changes in BaseJob, none of generated job classes needs a pimpl Private class. - gtad/template.*.mustache files are replaced with data.h.mustache for data structures (entirely defined in header files from now on) and operation.*.mustache for API operations (also massively moved to header files, possibly also becoming header-only in the future). - New variable-dropping and title-overring features in GTAD 0.7 allow to use the upstream matrix-doc repo to generate the code. - CMakeLists.txt makes use of file globbing with CONFIGURE_DEPENDS where possible to alleviate build reconfiguration after a GTAD call.
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-07Drop Qt Gui from qmake processKitsune Ral
2020-06-07AccountSettins: use perfect forwardingKitsune Ral
2020-06-07README.md: minor cleanupKitsune Ral
[skip ci]
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-01Merge branch 'kitsune-new-gtad'Kitsune 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-06-01.travis.yml: adjust to new GTADKitsune Ral
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-31room.cpp: clean away unused variablesKitsune Ral
2020-05-31BaseJob::rawData: overload for (even) quicker accessKitsune Ral
No functional changes either.