I am working on packaging Skanlite for Flathub, and I'm running into the following issue with both 1.0 version and current git master: STEPS TO REPRODUCE 1. Scan one or more documents 2. Click "Save" 3. In the file dialog, navigate to some location, type a filename, and click on the "Save" button OBSERVED RESULT The file dialogs closes, and main window shows a small message saying, "Nothing to save." EXPECTED RESULT The file is saved. ADDITIONAL INFORMATION Does not affect non-Flatpak version of the 1.0 release or current git master. You can see my draft Flatpak manifest here: https://github.com/Pointedstick/flathub/blob/skanpage/org.kde.skanpage.json
I mean Skanpage, of course. The names are so similar that I always mix them up!
Well, I have zero experience with flatpaks, so I don't know what's going on. The message is displayed in https://invent.kde.org/utilities/skanpage/-/blob/master/src/DocumentSaver.cpp at line 29. Means that either the specified fileUrl for saveing is empty or the document contains no actual pages. Since the scanning seems to be working, I guess it's the first.
OK, I will dig into it a bit soon. Probably a weird interaction with the XDG save portal that provides the file URL.
After some qWarning()/console.log() debugging, I've discovered that FileDialog in MainWindow.qml fails to set `fileUrl` after it's been accepted. This workes outside of a Flatpak, but fails within it, and I am starting to fear that this is a Qt bug.
Filed https://bugreports.qt.io/browse/QTBUG-101437 to track this. There's a chance it's an issue in our KDE desktop portal implementation rather than in Qt, but I don't understand enough about how these pieces interact to figure that out. CCing Jan Grulich who is more familiar.