File Dialog: fix testSelectUrl() again, i.e. selectUrl() should set the directory too
ClosedPublic

Authored by dfaure on Jul 28 2018, 12:30 PM.

Details

Summary

This was fixed initially in commit 7bbbd93 (https://phabricator.kde.org/D3796)
when the unittest was added, and broken later in commit bfd41a9
(https://phabricator.kde.org/D4193, bug 374913) which says Qt takes care
of taking the initial directory when calling selectUrl(). I cannot see
that in the Qt code, where selectUrl only calls selectFile_sys.

This breaks bug 374913 again (initial directory for remote files), but the
right fix for that is https://codereview.qt-project.org/235473

Test Plan

unittest

Diff Detail

Repository
R135 Integration for Qt applications in Plasma
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
dfaure requested review of this revision.Jul 28 2018, 12:30 PM
dfaure created this revision.

Does this mean for Qt < 5.12 (or .13?) pressing open in kwrite will select the cwd again?

I now have almost all my source directories NFS mounted rather than having to use sftp so it is no longer such a big issue for me. However, I do wonder if it makes sense to keep the current behaviour for older Qt versions? I.e. something like !m_directorySet || QT_VERSION < 5.12?

dfaure updated this revision to Diff 38681.Jul 28 2018, 8:00 PM

Add a workaround for the current Qt

+1 LGTM. Thanks!

I'll assume +1 and +1 = +2, and push...

This revision was not accepted when it landed; it landed in state Needs Review.Aug 19 2018, 10:30 PM
This revision was automatically updated to reflect the committed changes.
Restricted Application added a project: Plasma. · View Herald TranscriptAug 19 2018, 10:30 PM