https://bugs.kde.org/show_bug.cgi?id=402077

            Bug ID: 402077
           Summary: SaveFile does not set the current_name
           Product: xdg-desktop-portal-kde
           Version: unspecified
          Platform: Other
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: general
          Assignee: jgrul...@redhat.com
          Reporter: zrenf...@gmail.com
  Target Milestone: ---

As discussed in:
https://www.reddit.com/r/kde/comments/a5cxwk/firefox_v64_can_now_use_the_kde_file_selection/ebneet7/

OS: Manjaro Linux
xdg-desktop-portal: v1.0.3-1
xdg-desktop-portal-kde: v5.14.4-1


Here's where the GTK portal sets "current_name"
https://github.com/flatpak/xdg-desktop-portal-gtk/blob/master/src/filechooser.c#L479-L482

The KDE portal parses "current_name", but it seems that since there wasn't a
dedicated "setFilename" function, the fella moved on to implementing the rest.
https://github.com/KDE/xdg-desktop-portal-kde/blob/master/src/filechooser.cpp#L252

    // TODO: Looks Qt doesn't have API for this
    // if (!currentName.isEmpty()) {
    //    fileDialog->selectFile(currentName);
    // }


I'm not 100% sure if this is correct, but I found that QFileDialog can set the
"filename" label widget:
http://doc.qt.io/qt-5/qfiledialog.html#DialogLabel-enum
http://doc.qt.io/qt-5/qfiledialog.html#setLabelText

    if (!currentName.isEmpty()) {
       fileDialog->setLabelText(QFileDialog::FileName, currentName);
    }

I'll see about learning how to compile this once I've tested if setLabelText is
the correct method.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to