[Differential] [Request, 25 lines] D3796: Fix Plasma-QPA filedialog to show wrong directory with QFileDialog::selectUrl()
kossebau (Friedrich W. H. Kossebau)
noreply at phabricator.kde.org
Thu Dec 22 19:09:06 UTC 2016
kossebau created this revision.
kossebau added reviewers: Plasma, Frameworks, dfaure.
Restricted Application added a project: Plasma.
Restricted Application added a subscriber: plasma-devel.
REVISION SUMMARY
QFileDialog does not set the initialDirectory option in codepaths from
QFileDialog::selectUrl or QFileDialog::selectFile when passing the task
on to the native widget. So KDEPlatformFileDialogHelper has to make sure
itself that info is kept.
Because KDEPlatformFileDialogHelper::initializeDialog() calls
setDirectory(options()->initialDirectory()); as intended, usually during
the show event (and thus resets any otherwise wanted state of the filewidget
it has from previous setup calls via QFileDialog), to whatever value the
initialDirectory option had before, usually the working directory as set
during initialization.
TEST PLAN
New unit test kfiledialog_unittest testSelectUrl no longer fails with added
code, also behaves now as expected with code e.g. from KUrlRequester.
REPOSITORY
R135 Integration for Qt applications in Plasma
BRANCH
fixFileDialogDirectoryWithSelectUrl
REVISION DETAIL
https://phabricator.kde.org/D3796
AFFECTED FILES
autotests/kfiledialog_unittest.cpp
src/platformtheme/kdeplatformfiledialoghelper.cpp
EMAIL PREFERENCES
https://phabricator.kde.org/settings/panel/emailpreferences/
To: kossebau, #plasma, #frameworks, dfaure
Cc: plasma-devel, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20161222/aeab53e9/attachment.html>
More information about the Kde-frameworks-devel
mailing list