Fix QFileDialog::selectUrl() setting initial directory
Summary:
In D4193 setting the initial directory to the given URL when using
QFileDialog::selectUrl() was removed.
- This causes File → Open to not start in the current directory but in Gwenviews initial or last set path. In addition, due to adding StripTrailingSlash, D9886 caused the file dialog to select the last subfolder as a file instead of entering it. Both problems can be fixed by using QFileDialog::setDirectoryUrl() instead of QFileDialog::selectUrl().
- The first problem also occurs in File → Save As. Until this issue is fixed in the libraries an additional QFileDialog::setDirectoryUrl() is added as workaround.
FIXED-IN: 18.04.3
Test Plan:
- Open Gwenview
- Use File → Open or File → Save As
- The file dialog should start in the current directory
Reviewers: Gwenview, rkflx
Reviewed By: Gwenview, rkflx
Subscribers: rkflx
Differential Revision: https://phabricator.kde.org/D13795