-
rk flx authored
Summary: 63bc26c6 introduced a regression, where when upgrading from Spectacle 17.12 with {nav Save As} used last to 18.04 the {nav Save} button would show no text at all and clicking would be a no-op (the down arrow menu still worked, though). The reason is the removal of a `default` case, however the root problem has been there before: `lastUsedSaveMode()` could pass invalid values. This can be fixed by properly refactoring the latter method too and trading meticulosity for compactness when converting from `int` to `enum`, i.e. adding the `default` to the correct place. If Spectacle used KConfigXT this would not have been a problem in the first place… Test Plan: - `rm ~/.config/spectaclerc` - Start Spectacle 17.12, {nav Save As}, {nav Quit} - Start Spectacle from master {nav Save} button now correctly shows the default text instead of nothing at all. Button state still remembered after restart. Reviewers: #spectacle, ngraham Reviewed By: #spectacle, ngraham Subscribers: ngraham Differential Revision: https://phabricator.kde.org/D10682
b6a185b2