Age | Commit message (Collapse) | Author |
|
|
|
Closes #193.
|
|
Currently libqmatrixclient fails checking the `Content-Type` header
when there is an appendix like "charset". That is allowed e.g. in
[rfc7231](https://tools.ietf.org/html/rfc7231#section-3.1.1.5))
One example is a Content-Type `application/json` vs `application/json;charset=UTF-8`
Setting of the charset appendis is currently not supported. It fails with
libqmatrixclient.jobs: "LoginJob" status 106 : "Incorrect content type of the response"
This PR aims to just drop that appendix as it is currently not handled somewhere else.
|
|
Closes #183. There's also the m.read part but it can be done sometime later, as it's pure optimisation.
|
|
|
|
QtCreator
|
|
Closes #175.
|
|
Closes #177.
|
|
Closes #123 (room account data were parsed even before). No specific event classes for account data yet, though.
|
|
response
|
|
For a very brief period between calling BaseJob::abandon() and deletion of the job object.
|
|
|
|
|
|
|
|
A static method that constructs a request URL for this job and the passed set of parameters.
|
|
|
|
Should improve compatibility with compilers that don't like conversions
between different std::unique_ptr<> types.
|
|
|
|
|
|
Instead of exposing a QIODevice as GetContentJob does it gets a filename
and saves the incoming payload into it.
|
|
To support the upcoming DownloadFileJob
|
|
|
|
|
|
|
|
Fixes some signedness warnings
|
|
"crop" thumbnail type didn't seem to be ever used. Once GTAD is able to generate enums, the respective code will show up in GetContentThumbnailJob and this parameter can be reintroduced in MediaThumbnailJob. As of now, just rely on the default "scale" value.
|
|
|
|
properly convert numbers to strings in query
The query should be set in constructor body because there's no reason to pass non-required parameters into the query.
As for numbers to strings conversion - there was an attempt to use QJsonValue(a).toString() for that. That doesn't work; QJsonValue does not turn numbers to strings.
|
|
|
|
|
|
Enable specifying headers in the request and checking/using headers in the response.
|
|
|
|
Otherwise isJobRunning() is of no great use.
|
|
|
|
It is the application's responsibility to properly display the error and get confirmation from the user about it.
|
|
and User
The switch is necessary because MediaThumbnailJob is supposed to return something that can be worked on in non-GUI threads (as is the case of QML image providers), and QPixmap is not supposed for usage out of the main thread.
|
|
|
|
This prepares the backend to enable timeouts/retry intervals configurable from clients.
|
|
This fixes compilation with older compilers that try to instantiate a copy constructor (and fail because unique_ptr) but actually is more proper in general. Also: do not advertise the class as Q_MOVABLE_TYPE: this was useful for QList/QVector when SyncRoomData was copyable; now it isn't, and Qt containers can't deal with non-copyable classes at all.
|
|
This causes the following changes along the way:
- Owning<> template is decommissioned.
- event.h has been rearranged, and Event/RoomEvent::fromJson static methods have been replaced with an external makeEvent<> function template. A side effect of that is that one cannot use a factory with a type other than the one it's defined for (i.e. you cannot call makeEvent<TypingEvent>) but that feature has been out of use for long anyway.
- Room::doAddNewMessageEvents() and Room::doAddHistoricalMessageEvents() have been removed, giving place to Room::onAddNewTimelineEvents() and Room::onAddHistoricalTimelineEvents(). The most important difference is that all code that must be executed now resides in addNewMessageEvents() (it moved from Room to Room::Private) and classes inheriting from Room are not obliged to call the overridden function from the overriding function (they can do it but those functions have empty bodies in Room). This was a long overdue change, and owning pointers simply mandated it. Room::onAddNewTimelineEvents/onAddHistoricalTimelineEvents should not do anything with the passed range in terms of ownership, it's just a way to allow the derived class to update his data in due course.
- Room::Private::dropDuplicateEvents() and Room::Private::insertEvents(), notably, have been updated to work with owning pointers. insertEvents() move()s pointers to the timeline, while dropDuplicateEvents uses remove_if instead of stable_partition and doesn't explicitly delete event objects.
Also, a bugfix: Event accidentally had not virtual destructor for quite a long time. According to the standard, deleting an object through a pointer to a base class without a virtual destructor leads to UB. So the fact that libqmatrixclient clients even worked all these months is mere coincidence and compiler authors good will :-D
|
|
|
|
notifications and others
Closes #128 (the issue has the full list of jobs arriving herewith).
|
|
This is needed to support cases of content-repo, where the request/response bodies are not JSON.
|
|
|
|
It's now camelCase everywhere, even if The Spec uses snake_case (it is
not consistent in that respect).
|
|
This is important for (soon to be added) LoginJob, since the server is
sensitive to getting an (even empty) entity for "medium" as opposed to
omitting it entirely. This cannot be addressed on the spec level; on the
other hand, removing empty parameters from the payload reduces useless
bytes getting on the wire.
|
|
For job endpoints, we should eventually move to QLatin1String or QByteArray instead. Maybe later.
|
|
Closes #125
|
|
|
|
Because they are applicable beyond jobs.
|