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

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

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Do
    • Icon: P3: Somewhat important P3: Somewhat important
    • None
    • 5.12.4
    • None
    • Linux/Wayland

      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.]

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

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

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes