D20197: Fix desktop link to file or directory

Robert Hoffmann noreply at phabricator.kde.org
Sun Apr 7 10:52:17 BST 2019


hoffmannrobert added a comment.


  In D20197#445098 <https://phabricator.kde.org/D20197#445098>, @dfaure wrote:
  
  > Ah! So "DirOrFile" means the user can see and choose both directories and files? Maybe call this ModeWasDirAndFile. I kept reading this was "mode was dirs or mode was files" (which made me say "what else is there?"), while now I think I understand it means "mode was (both dir+files)", right?
  
  
  Yes. In KDE4, with KFileDialog, this used to work, KFileDialog can select both dirs and files, but QFileDialog can't.
  
  > Won't this additional popup be annoying for other applications using KUrlRequester? I'm afraid that one use case where it makes sense, pollutes other use cases.
  >  Can you confirm it only shows up when saving, and when the mode is "dir+files"?
  
  This popup only shows up if
  
    ((fileDialogMode & KFile::Directory) && (fileDialogMode & KFile::File))
  
  or ModeWasDirAndFile, which can only be set to true if mode previously was
  
    ((fileDialogMode & KFile::Directory) && (fileDialogMode & KFile::File))
  
  In this case there always needs to be a decision between File and Directory before the QFileDialog is created, because QFileDialog cannot be set up to be a chooser for both at the same time.
  
  All use cases which want to get an url from KUrlRequester and set the mode to both KFile::Directory and KFile::File must get the user's decision before the QFileDialog is shown.
  
  AcceptMode is independent from this, it can be both AcceptOpen and AcceptSave.

REPOSITORY
  R241 KIO

REVISION DETAIL
  https://phabricator.kde.org/D20197

To: hoffmannrobert, #frameworks, ngraham, dfaure
Cc: ngraham, kde-frameworks-devel, michaelh, bruns
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20190407/5e3061b7/attachment.html>


More information about the Kde-frameworks-devel mailing list