Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-77825

QFileDialog::directory() returns the wrong directory with xdg-desktop-portal

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P3: Somewhat important
    • None
    • 5.12.4
    • None
    • Linux/Wayland

    Description

      The QFileDialog::directory() method returns the current directory being browsed in the file dialog. Normally this works correctly whether the dialog is in AnyFile, ExistingFile, or Directory mode.

      But when running in Flatpak, the directory() method returns a stale constant directory path instead of the directory that the file dialog is browsing when a file is selected. This seems to affect the dialog running in AnyFile, ExistingFile, or ExistingFiles mode. This bug does not seem to affect a dialog running in Directory file mode.

      I created a small project to demonstrate this difference [here|https://gitlab.com/mtmiller/flatpak-qt-dialog-bug.]

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              jgrulich Jan Grulich
              mtmiller Mike Miller
              Votes:
              1 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There are no open Gerrit changes