summaryrefslogtreecommitdiffstats
path: root/src/android
diff options
context:
space:
mode:
authorVolker Hilsheimer <volker.hilsheimer@qt.io>2022-06-10 22:44:19 +0200
committerVolker Hilsheimer <volker.hilsheimer@qt.io>2022-06-13 14:04:31 +0200
commitac80cee846e270a42ce736cac80ca865321b5422 (patch)
treef4f601cd3d5873af11deadf230bf1f5a9f1bd9d4 /src/android
parente7477e8934ab38722f5589914d08b3f15e870109 (diff)
Don't crash when removing the last visible tab
The code incorrectly tried to ensure that the firstVisible tab was a valid index, even though there might not be any visible tab left after removing the last visible tab. The same logic didn't exist of the lastVisible tab, so we tripped the assert in qBound, as max (being -1) ended up smaller than min (0). Fix this by removing the wrong correcting of firstVisible to be always valid. Make sure we emit currentChanged with -1 when no visible tab is left after removing the current tab. Add a test. Fixes: QTBUG-104003 Pick-to: 6.3 6.2 Change-Id: I27e6438a02d0a0f1ac4d0e0160cee4f33b3f3766 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Diffstat (limited to 'src/android')
0 files changed, 0 insertions, 0 deletions