Age | Commit message (Collapse) | Author |
|
|
|
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.
|
|
A static method that constructs a request URL for this job and the passed set of parameters.
|
|
|
|
|
|
To support the upcoming DownloadFileJob
|
|
|
|
|
|
|
|
To support the upcoming DownloadFileJob
|
|
|
|
Fixes some signedness warnings
|
|
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.
|
|
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.
|
|
|
|
It is the application's responsibility to properly display the error and get confirmation from the user about it.
|
|
This prepares the backend to enable timeouts/retry intervals configurable from clients.
|
|
|
|
Closes #125
|
|
|
|
|
|
|
|
Closes #102.
|
|
Having to pass ConnectionData to each and every job class was nothing but boilerplate since the very beginning. Removing it required to prepend BaseJob::start() with ConnectionData-setting code, and to provide a way to alter the request configuration depending on the (late-coming) ConnectionData object. This is a new responsibility of BaseJob::start(); the previous BaseJob::start() contents have moved to BaseJob::sendRequest() (which is now invoked on retries, instead of start()).
|
|
Having to pass ConnectionData to each and every job class was nothing but boilerplate since the very beginning. Removing it required to prepend BaseJob::start() with ConnectionData-setting code, and to provide a way to alter the request configuration depending on the (late-coming) ConnectionData object. This is a new responsibility of BaseJob::start(); the previous BaseJob::start() contents have moved to BaseJob::sendRequest() (which is now invoked on retries, instead of start()).
|
|
|
|
Also: no reason to start the job timer if the request is not running, so don't even bother.
|
|
Your QT_LOGGING_RULES (especially useful with Qt 5.6 and newer) should
work a bit better now:
* "Job" prefix is no more needed because the Qt logging prefix
(libqmatrixclient.jobs) says it already;
* The "created" record didn't follow the logging category if overridden
from the concrete job class (see SyncJob); so instead of "created"
there's now much more useful "sending request" record.
|
|
It seems that some reply processing still might have happened after
BaseJob::abandon() (caused in turn by destroying a Connection object),
probably because the event from QNetworkReply landed in the event queue
after BaseJob::abandon() but before actual deletion of a job object. Now
countered by disconnecting from QNetworkReply signals in abandon() and
stop().
|
|
This reverts commit da975f68f6a8503bf5466292dcdceed8c6f7fa6f.
|
|
|
|
Code tweaks and cleanup
|
|
logging.h/logging.cpp is now a full-fledged pair for all things logging. Two more categories added, EPHEMERAL and SYNCJOB, that control logging for ephemeral events and SyncJob, respectively (in particular, switching off EPHEMERAL greatly reduces the logspam about moving read markers and how many users have read up to which event).
|
|
Before the access token was added to Private::requestQuery on every sendRequest() invocation, leading to the same access token being added up to the request once more with each retry.
|
|
Mainly it's about const-ification (in particular, passing const-refs instead of values) and deleting unneeded declarations/#includes. Since the changes alter the external interface, this is submitted as a PR for peer review.
One of unneeded declarations/definitions is a virtual destructor in BaseJob descendants. Since a job object should be deleted through QObject::deleteLater() anyway (and it's the only correct way of disposing of the object), all deletions will call the stack of destructors through virtual QObject::~QObject(). Therefore even BaseJob could get on with a non-virtual destructor but for the sake of clarity BaseJob::~BaseJob() is still declared virtual.
|
|
This greatly reduces the noise made by quaternion.
To enable full logging, export the following variable:
QT_LOGGING_RULES="libqmatrixclient.*.debug=true"
|
|
|
|
This is what /join returns if I supply garbage for the alias.
|
|
As of now, the retry logic (see BaseJob::finishJob() method) invokes the same network request several times with increasing timeouts and retry intervals. Some additional signals and accessors are also provided to control the behaviour from inheriting classes (see a notable example with SyncJob in the same commit) and clients (support of retries in Quaternion comes in a respective commit shortly).
|
|
This should help to provide more reasonable error messages when a particular resource is not found or entered data are outright incorrect.
|
|
data() in each job class
|
|
This should avoid timeout event catching up on a not-yet-deleted-but-
already-invalid job object.
|