Skip to content
Commit 49a52e74 authored by Peter Mühlenpfordt's avatar Peter Mühlenpfordt
Browse files

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 {nav 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 {nav 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 {nav File > Open} or {nav 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
parent 6585f6f0
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment