Fix QFileDialog not remembering the last visited directory.

Authored by dfaure on Mar 31 2018, 7:45 AM.

Description

Fix QFileDialog not remembering the last visited directory.

Summary:
This regression (compared to kdelibs4's direct KFileDialog usage) came
from the fact that QFileDialog's lastVisited() only gets updated if
the helper emits directoryEntered.

So QFileDialog was setting the current dir as startDir every single
time, overriding's KFileWidget's own logic for reusing the last dir
initially.

Test Plan:
QFileDialog::getOpenFileName(this, i18n("Select file"));
twice in a row, from the same process.

Reviewers: anthonyfieroni, elvisangelaccio, plasma-devel, broulik, arichardson, ngraham

Reviewed By: ngraham

Subscribers: ngraham, apol

Tags: Plasma

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

(cherry picked from commit b269980db1d7201a0619f3f5c6606c96b8e59d7d)

Details

Committed
dfaureAug 20 2018, 11:55 AM
Reviewer
ngraham
Differential Revision
D14437: Fix QFileDialog not remembering the last visited directory.
Parents
R135:73eeda3a7dfb: [QDBusMenuBar] Guard m_window with a QPointer
Branches
Unknown
Tags
Unknown