Fix testSaveAsUndoStackAnnotations autotest
Summary:
Okular allows to drop changes when saving to a file format not
supporting those. However, this is only sensible for Save As,
while for Save the Continue button is not needed. When this
behaviour was introduced in 481676dcedf1, the jpg test row failed
subsequently, because closeDialogHelper relies on the availability of
the Continue button. The epub test row is similar, but returns
early because it does not allow canSwapBackingFile and therefore does
not fail the test afterwards.
As the test progresses, the initial Save As (potato.jpg to
/tmp/123.jpg) is implicitly followed by Save (/tmp/123.jpg to
/tmp/123.jpg) for each subsequent part.saveAs. This causes the
Continue button to vanish, so eventually the test will fail.
Forcing Save As so the Continue button continues to exist
could be done in multiple ways, but just alternating between two
different files to save seems like the most efficient and most readable
approach.
Test Plan:
- ./autotests/parttest testSaveAsUndoStackAnnotations:jpg now passes.
- Other test rows still pass.
- No changes to non-test code needed.
Reviewers: aacid, Okular
Reviewed By: aacid, Okular
Subscribers: Okular
Tags: Okular
Differential Revision: https://phabricator.kde.org/D9579