KViewStateSerializer: Fix crash when view is destroyed before state serializer
KViewStateSerializer::restoreScrollBarState() calls QScrollBar::maximum()
on an invalid (i.e. already deleted) scrollbar. This means, the enclosing
QAbstractScrollArea has been deleted between the call to ::restoreScrollState()
and the deferred (via a single shot timer) ::restoreScrollBarState().
This commit works around the issue by allowing users to delete the view
immediately after ::restoreScrollState() was called.
BUG: 353380
FIXED-IN: 5.35.0
Reviewers: Frameworks, skelly
Reviewed By: skelly
Subscribers: mlaurent
Differential Revision: https://phabricator.kde.org/D5821