The change from QString to Qurl in 0a1f081ebe75eaf25a1142e5efd00cb2354e35fe broke it.
Details
Details
- Reviewers
broulik - Group Reviewers
Spectacle - Commits
- R166:4fb409bfb12d: Fix counting up placeholder (%Nd)
Press save button two times
Diff Detail
Diff Detail
- Repository
- R166 Spectacle
- Lint
Automatic diff as part of commit; lint not applicable. - Unit
Automatic diff as part of commit; unit tests not applicable.
Comment Actions
ExortManager::defaultSaveLocation() is used in formatFilename() where the QString is used to create a QDir from it. In formatFilename() the placeholders are replaced by the respective values. For doing the counting of filenames we check if their are already files in the directory we save to that look like the current filename format. Because toString() includes the protocol this didn't work. If you set your filename template to image%1d.png and press save twice these are the resulting filenames:
- Without this patch: image1.png, image1-1.png (Because the lookup didn't work and to avoid overwriting a file a "-1" is appended)
- WIth this patch image1.png, image2.png
Comment Actions
Patch makes sense either way. Also fixes Spectacle creating a folder named file: in my home every time I take a screenshot.