Fix regression in which the save dialog appears as an Open dialog
Review Request #129732 - Created Dec. 31, 2016 and submitted
|Albert Astals Cid|
7bbbd93cd3fc0abdffd3fa7f144cb50a33fafad9 makes the save dialog appear as Open dialog.
Simplify the code in that commit so it does not regress anymore.
Comes with a unit test (argably a bit meh since it could loop forever if the dialog does not show, but i guess it is good if that happens too :D)
New test fails without the patch, works with it. Kate Save As dialog no longer shows as Open dialog.
Thanks for the fix! I did notice something strange with save dialogs lately ;-)
Not needed, auto-remove is on by default.
A better approach would be
This will repeatedly call findFileWidget() until it works or until 5 seconds have passed.
Then you don't need timers nor separate methods nor a new member variable. The rest of the test can just follow that line.
Looks good from my POV (+ changes to comment as discussed on irc). Though my POV is limited, file widgets being not my playing ground, so perhaps better have someone else ship-it, too.