aboutsummaryrefslogtreecommitdiff
path: root/jobs/mediathumbnailjob.h
AgeCommit message (Collapse)Author
2016-10-15BaseJob: Use saved parameters instead of overriding apiPath(), query() and ↵Kitsune Ral
data() in each job class
2016-10-14MediaThumbnailJob: Use QSize instead of two separate int's for sizeKitsune Ral
Connection::getThumbnail() is now overloaded to provide compatibility with the previous interface.
2016-07-27Introduce Status class + BaseJob::{checkReply,parseReply,parseJson} now ↵Kitsune Ral
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.
2016-07-26Split BaseJob::gotReply into checkReply and parseReply + internal tweaks to ↵Kitsune Ral
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).
2016-07-22Removed unneeded Q_OBJECT macros (slots don't require Q_OBJECT to work).Kitsune Ral
2016-05-27Use 'override' keyword throughout job classes; constify apiPath(), query(), ↵Kitsune Ral
data() Thanks to CLang model.
2016-04-05Imported the current source tree from Quaternion/lib.Kitsune Ral