• Michael Weghorn's avatar
    tdf#123750 kde5: Show removable devices in file dialog · 2c69c93f
    Michael Weghorn yazdı
    As the Qt documentation for 'QFileDialog::supportedSchemes'
    says, setting supported schemes to a non-empty list restricts
    the available options:
    "Setting this property allows to restrict the type of URLs
    the user will be able to select. It is a way for the application
    to declare the protocols it will support to fetch the file
    content. An empty list means that no restriction is applied
    (the default)."
    
    The call to 'QFileDialog::setSupportedSchemes' was copied
    over from the gtk3_kde5 VCL plugin in commit
    6196b729, where it had been
    added by commit f1b60bd6
    "Support opening of (some) remote URLs through the KDE file
    dialog".
    
    Since only either all schemes (if nothing explicitly set)
    or a whitelist of supported locations seems to
    be possible (s.a. the Phabricator changes referenced
    in the commit message of commit
    f1b60bd6), add the
    "" scheme that makes removable devices shown -- while
    there doesn't seem to be an official documentation on
    the available schemes, at least not in
    KFileWidget's API documentation [1].
    
    A quick test with all new available options after removing
    the call to 'QFileDialog::setSupportedSchemes' altogether
    indicated that opening and saving files there doesn't work
    reliably in all cases, so rather excplicitly add the ""
    scheme rather than claiming support for all schemes
    (including e.g. "timeline", "search", "remote", "trash").
    
    [1] https://api.kde.org/frameworks/kio/html/classKFileWidget.html
    
    Change-Id: I89dc37d0f06d280e5dd599f90768c13e8edb915b
    Reviewed-on: https://gerrit.libreoffice.org/71320
    Tested-by: Jenkins
    Reviewed-by: 's avatarKatarina Behrens <Katarina.Behrens@cib.de>
    2c69c93f
Adı
Son kayıt (commit)
Son güncelleme
..
KDE5FilePicker.hxx Loading commit data...
KDE5FilePicker2.cxx Loading commit data...
KDE5SalFrame.cxx Loading commit data...
KDE5SalFrame.hxx Loading commit data...
KDE5SalGraphics.cxx Loading commit data...
KDE5SalGraphics.hxx Loading commit data...
KDE5SalInstance.cxx Loading commit data...
KDE5SalInstance.hxx Loading commit data...
tst_exclude_posted_events.hxx Loading commit data...
tst_exclude_socket_notifiers.hxx Loading commit data...