Age | Commit message (Collapse) | Author |
|
QJsonObject stock constructors are boring anyway - using QJsonObject::QJsonObject wasn't really necessary.
|
|
data() in each job class
|
|
return it
This better fixes the contract for derived job classes and simplifies error reporting. Methods error() and errorString() are kept for back-compatibility; status() returns a combination of them, conveniently packed into a Status object. For a quick status check, Status::good() is provided.
|
|
BaseJob
1. The externally (for derived classes) visible additions are checkReply() and parseReply() virtual methods, with gotReply becoming a mere dispatcher (and therefore a private method). Splitting gotReply() in that way allowed to remove boilerplate code from MediaThumbnailJob.
2. The internal tweak is using QScopedPointer<> to store pointers both to the Private object and to a QNetworkReply (with a special deleter that aborts the reply before destructing the object). This allows to remove desperate attempts to call reply->abort() wherever it's no more needed (and not aborting the in-flight replies seems to be a/the culprit of Quaternion after-exit hangs).
|
|
Some parts of the code were copied from the KCoreAddons sources - surprisingly few, in fact, mostly API with comments. With this commit, libqmatrixclient doesn't depend on KCoreAddons.
|
|
well + stability fixes
1. Introduce ContentAccessDenied error code to BaseJob to allow clients to treat access denial errors differently from other network errors.
2. Since parseJson() overrides are responsible for calling emitResult(), the "default" BaseJob::parseJson() should call emitResult() as well.
3. Make sure BaseJob::fail() doesn't crash in absence of QNetworkReply.
|
|
data()
Thanks to CLang model.
|
|
And we don't need two log lines for timeouts.
|
|
destruction of the job
|
|
This is to facilitate processing of job results (see further commits).
|
|
|
|
|