<table><tr><td style="">kossebau created this revision.<br />kossebau added reviewers: Plasma, Frameworks, dfaure.<br />Restricted Application added a project: Plasma.<br />Restricted Application added a subscriber: plasma-devel.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D3796" rel="noreferrer">View Revision</a></tr></table><br /><div><strong>REVISION SUMMARY</strong><div><p>QFileDialog does not set the initialDirectory option in codepaths from<br />
QFileDialog::selectUrl or QFileDialog::selectFile when passing the task<br />
on to the native widget. So KDEPlatformFileDialogHelper has to make sure<br />
itself that info is kept.<br />
Because KDEPlatformFileDialogHelper::initializeDialog() calls<br />
setDirectory(options()->initialDirectory()); as intended, usually during<br />
the show event (and thus resets any otherwise wanted state of the filewidget<br />
it has from previous setup calls via QFileDialog), to whatever value the<br />
initialDirectory option had before, usually the working directory as set<br />
during initialization.</p></div></div><br /><div><strong>TEST PLAN</strong><div><p>New unit test kfiledialog_unittest testSelectUrl no longer fails with added<br />
code, also behaves now as expected with code e.g. from KUrlRequester.</p></div></div><br /><div><strong>REPOSITORY</strong><div><div>R135 Integration for Qt applications in Plasma</div></div></div><br /><div><strong>BRANCH</strong><div><div>fixFileDialogDirectoryWithSelectUrl</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D3796" rel="noreferrer">https://phabricator.kde.org/D3796</a></div></div><br /><div><strong>AFFECTED FILES</strong><div><div>autotests/kfiledialog_unittest.cpp<br />
src/platformtheme/kdeplatformfiledialoghelper.cpp</div></div></div><br /><div><strong>EMAIL PREFERENCES</strong><div><a href="https://phabricator.kde.org/settings/panel/emailpreferences/" rel="noreferrer">https://phabricator.kde.org/settings/panel/emailpreferences/</a></div></div><br /><div><strong>To: </strong>kossebau, Plasma, Frameworks, dfaure<br /><strong>Cc: </strong>plasma-devel, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas<br /></div>