use the same bound check as setCurrentItem when setting m_currentItem manually
ClosedPublic

Authored by fabiank on Apr 6 2018, 4:10 PM.

Details

Summary

This patch basically adds the check that would normally be done to the
itemInserted method, which seems to be good idea in general.
However, the fact that this is needed there might be an indicator of a logic bug
in the function – though, as I'm not familiar with the code base I cannot judge
this.

Test Plan

Without this patch, dolphin when started from a terminal prints the following
warning (number can be different):
qt.accessibility.core: Cannot create accessible child interface for object: PlacesView(0x563e863e35c0) index: 10
After applying the patch, the warning doesn't appear anymore. Dolphin still
works still as it did before.

Diff Detail

Repository
R318 Dolphin
Branch
annoyingAccessibilityWarning
Lint
No Linters Available
Unit
No Unit Test Coverage
fabiank created this revision.Apr 6 2018, 4:10 PM
Restricted Application added a subscriber: Dolphin. · View Herald TranscriptApr 6 2018, 4:10 PM
fabiank requested review of this revision.Apr 6 2018, 4:10 PM

I don't think there is a logic bug, this is just a missing check for an off-by-one error caused by the places panel (if you hide it, the warning is gone).

Do you have commit access?

This revision is now accepted and ready to land.Apr 8 2018, 9:38 AM

Yes, I have commit access. This should (arc) land in master?

This revision was automatically updated to reflect the committed changes.