Change defaultSaveLocation to use QUrl

Authored by davidre on Jun 5 2019, 1:35 PM.

Description

Change defaultSaveLocation to use QUrl

Summary:
There were two issues with the default save lcoation. First the url passed to
QFileDialog was missing the "file://" prefix and the file dialog would open in
the working directory of the application (usually /). The second issue hidden
by this was that the last part of the path (~/Pictures) was removed because it
was returned through functions which expect file paths and trim them to get a
path to a folder. To avoid this a slash is added to the path.

BUG: 406058

Test Plan:
Open Spectacle with a fresh user or delete lines related to save paths from
your spectaclerc. Clicking on "Save as..." should open the dialog in
~/Pictures.

Reviewers: Spectacle, ngraham

Reviewed By: Spectacle, ngraham

Subscribers: ngraham, broulik

Tags: Spectacle

Differential Revision: https://phabricator.kde.org/D21556

Details

Committed
davidreJun 5 2019, 1:39 PM
Reviewer
Spectacle
Differential Revision
D21556: Change defaultSaveLocation to use QUrl
Parents
R166:fbdc5630913f: Fix forward declaration
Branches
Unknown
Tags
Unknown