D23159: Prevent error() being emitted when purposefully reading 0 bytes

2019-08-15 Thread Alexander Saoutkin
feverfew abandoned this revision. feverfew added inline comments. INLINE COMMENTS > feverfew wrote in file.cpp:524 > I think that would be appropriate for a separate revision which I'm doing. > This revision is only to handle the case outlined in the summary. Actually I've realised using the

D23159: Prevent error() being emitted when purposefully reading 0 bytes

2019-08-15 Thread Alexander Saoutkin
feverfew added inline comments. INLINE COMMENTS > chinmoyr wrote in file.cpp:524 > This doesn't support error reporting. Why not refactor this loop using > read(char *, qint64)? I believe you can accommodate your changes inside the > loop cleanly then. I think that would be appropriate for a

D23159: Prevent error() being emitted when purposefully reading 0 bytes

2019-08-15 Thread Chinmoy Ranjan Pradhan
chinmoyr added inline comments. INLINE COMMENTS > file.cpp:524 > while (true) { > QByteArray res = mFile->read(bytes); > This doesn't support error reporting. Why not refactor this loop using read(char *, qint64)? I believe you can accommodate your changes inside the loop

D23159: Prevent error() being emitted when purposefully reading 0 bytes

2019-08-14 Thread Alexander Saoutkin
feverfew added inline comments. INLINE COMMENTS > apol wrote in file.cpp:520 > this should be > > { > Q_EMIT data({});` > return; > } > > I'm not sure that we'd need an empty data emitted then. Are you trying to fix > a specific bug that triggers this? I('ve not seen any

D23159: Prevent error() being emitted when purposefully reading 0 bytes

2019-08-14 Thread Aleix Pol Gonzalez
apol added inline comments. INLINE COMMENTS > file.cpp:520 > +// Nothing to do... > +return data(QByteArray()); > +} this should be { Q_EMIT data({});` return; } I'm not sure that we'd need an empty data emitted then. Are you trying to fix a specific bug

D23159: Prevent error() being emitted when purposefully reading 0 bytes

2019-08-14 Thread Alexander Saoutkin
feverfew created this revision. feverfew added reviewers: dfaure, fvogt, chinmoyr. Herald added a project: Frameworks. Herald added a subscriber: kde-frameworks-devel. feverfew requested review of this revision. REVISION SUMMARY Currently when 0 is passed as a parameter, if the file to be read