Age | Commit message (Collapse) | Author |
|
This concludes the Great Income of Jobs to libQMatrixClient - all CS API calls
are now covered with job classes, yay!
|
|
Same as for account management jobs, auth objects are modeled as generic
QJsonObjects for now.
|
|
Regrettably had to cut corners and use QJsonObject for auth_data.yaml because
GTAD 0.6 doesn't properly deal with a combination of properties and
additionalProperties in the API description.
|
|
Getting a single event (/events), getting the full room state as well as with
a specific type/key (/state), getting the list of room members (/members and
/joined_members).
|
|
variant types now use comma (,) as a delimiter instead of | (because regexes).
Also: moved around the `schema` section to be closer to `$ref`.
|
|
|
|
|
|
Qualify functions properly; add converters.* to libqmatrixclient.pri
|
|
|
|
|
|
|
|
|
|
Because GTAD has been updated to use a different default name for
returned properties.
|
|
Thanks to the latest GTAD. QJsonObject wasn't quite correct there.
|
|
This mandated some rearrangement of toJson() overloads and FromJson<>
specializations for QVariant* types - instead of variant_converters.h they are
now in converters.cpp.
|
|
|
|
1. defaultValue now preempts Omittable<>
2. Fixed the problem when defaultValue was provided but initializer was empty
(a case for int's, bool's etc.)
|
|
...with the latest GTAD
|
|
|
|
|
|
Closes #211.
|
|
There's no case for a nullptr in that function, and I'm fine to use
non-const ref parameters.
|
|
|
|
They lead to an (incorrect) assumption that those attributes are actual
binary flags rather than just flags (there's no such thing as
avoidCopy=false, avoidCopy should be absent instead).
|
|
|
|
Also: use the latest feature of GTAD, +set/+on, to make gtad.yaml more compact.
|
|
|
|
Closes #210.
|
|
Closes #207.
|
|
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.
|
|
So that it could be used outside of room context.
|
|
The newly introduced statusChanged() signal allows clients to be
notified about the job state transitions.
|
|
There is no more BaseJob::kill() for a very long time; we have abandon()
instead, with a bit different meaning. Which, by the way, now emits
finished() because that's what finished() has been for.
|
|
The second part to close #208.
|
|
This is important because payloads that include omitted parameters may be malformed. Closes #208 (an example of such malformed payload).
|
|
The first two as Q_PROPERTYs, the last one as Q_INVOKABLE.
|
|
Connection
(Note: this commit breaks back-compatibility.)
BaseJob::gotReply() had a bold assumption that whenever there's no reasonable JSON body in case of error, that meant IncorrectRequestError (which of course was incorrect). This led to syncs dying in Quaternion because it (correctly) considered IncorrectRequestError to be grave enough to not retry. Closes #206.
Also: don't dump the whole payload to logs, limit with initial 500 characters (closes #205)
|
|
|
|
|
|
|
|
|
|
|
|
one-on-one
|
|
|
|
|
|
|
|
With most recent GTAD.
|
|
QStringList's API is richer, after all.
|
|
QStringList's API is richer, after all.
|
|
|