Timeline for QNetworkReply network reply timeout helper
Current License: CC BY-SA 4.0
10 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Jul 13, 2018 at 11:16 | comment | added | Kuba hasn't forgotten Monica |
The Q_OBJECT macro is required on all QObject-derived classes. It is an implementation detail that it could be skipped on some classes, but it makes the classes thus "improved" not be QObjects in the Liskov Substitution Principle sense. E.g. all users of QObject expect that the metadata is correct and thus qobject_cast works. Skip Q_OBJECT and it's not true, thus you have a class that the compiler lets you use where a QObject can be used, but it's not really a QObject anymore. As for the timeout, it's Qt lingo for ms. If anything, I'd use std::duration instead.
|
|
| Jul 11, 2018 at 13:45 | comment | added | Violet Giraffe |
The Q_OBJECT macro is not required here and it hurts at least the compilation time (if not runtime weight of the object). Also, I would rename timeout to something like timeoutMsec so that it's immediately clear which units the timeout is in.
|
|
| Jul 11, 2018 at 13:35 | comment | added | Violet Giraffe |
@CaptRespect: I'd say that's outside the scope of responsibility of this class. It's the user's responsibility to specify a sensible timeout based on the knowledge about what exactly is being downloaded via the supplied QNetworkReply.
|
|
| S Jul 6, 2018 at 9:09 | history | edited | Billal BEGUERADJ | CC BY-SA 4.0 |
The constructor name was still "QReplyTimout" like the original poster named his class, changed it to "ReplyTimeout" like you used in your example. Added the word "code" to satisfy the number of characters changed for an edit.
|
| S Jul 6, 2018 at 9:09 | history | suggested | ita | CC BY-SA 4.0 |
The constructor name was still "QReplyTimout" like the original poster named his class, changed it to "ReplyTimeout" like you used in your example. Added the word "code" to satisfy the number of characters changed for an edit.
|
| Jul 6, 2018 at 9:07 | review | Suggested edits | |||
| S Jul 6, 2018 at 9:09 | |||||
| Mar 30, 2017 at 19:39 | comment | added | CaptRespect | This looks great, but if the upload/download is large won't this timeout even though it's transmitting? Should you cancel/restart the timer when uploadProgress is received? | |
| May 25, 2016 at 17:50 | history | edited | Kuba hasn't forgotten Monica | CC BY-SA 3.0 |
added 10 characters in body
|
| May 25, 2016 at 17:44 | history | edited | Kuba hasn't forgotten Monica | CC BY-SA 3.0 |
added 10 characters in body
|
| May 25, 2016 at 17:38 | history | answered | Kuba hasn't forgotten Monica | CC BY-SA 3.0 |