Handle unsupported OCS commands, and don't over-vote
ClosedPublic

Authored by leinir on Mar 18 2019, 3:25 PM.

Details

Summary

When the server does not support certain commands (such as voting), don't be quite so loud about it. It is not a critical error, and we should accept it when we are told so.

Also, the same bug report covers votes being sent out during listing of items. This is caused by the rating being set sometime after setting up a signal chain, and then changing the rating of the widget. So, block signals when we're simply updating the rating's internal state.

BUG:391111

Diff Detail

Repository
R304 KNewStuff
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
leinir created this revision.Mar 18 2019, 3:25 PM
Restricted Application added a project: Frameworks. · View Herald TranscriptMar 18 2019, 3:25 PM
Restricted Application added a subscriber: kde-frameworks-devel. · View Herald Transcript
leinir requested review of this revision.Mar 18 2019, 3:25 PM
ngraham added inline comments.Mar 18 2019, 3:29 PM
src/ui/itemsviewdelegate.cpp
287

Why do we need to do this twice?

leinir marked an inline comment as done.Mar 18 2019, 3:29 PM
leinir added inline comments.
src/ui/itemsviewdelegate.cpp
287

ehrm... we don't, we need to undo it, and i forgot to swap that true for a false ;) Thanks!

leinir updated this revision to Diff 54235.Mar 18 2019, 3:31 PM
leinir marked an inline comment as done.

Copypasta error... thanks Nate :)

ngraham accepted this revision.Mar 18 2019, 3:34 PM

Thanks! Makes sense, and fixes the bug. :)

Of course the underlying issue is still present. If you can't vote from the GHNS dialogs, there shouldn't be a UI for let you try; it should be strictly read-only. I suppose that's a separate matter though.

This revision is now accepted and ready to land.Mar 18 2019, 3:34 PM

Thanks! Makes sense, and fixes the bug. :)

Of course the underlying issue is still present. If you can't vote from the GHNS dialogs, there shouldn't be a UI for let you try; it should be strictly read-only. I suppose that's a separate matter though.

Yeah, first step being to not make things look critically broken is good, and then we can work out the larger thing of making it behave pleasantly and disallow voting for servers which don't, well, allow it :)

This revision was automatically updated to reflect the committed changes.