Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions client/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,22 @@

int main( int argc, char *argv[] )
{
#ifdef Q_OS_LINUX
// On GNOME Qt picks the GTK3 platform theme, whose file chooser hard-codes
// gtk_file_chooser_set_local_only(true). That hides every location without a
// native path, so gvfs network mounts (NAS over SFTP/SMB, added in Files) are
// missing from the save dialog even though they are mounted and writable.
// The xdg-desktop-portal chooser is GTK4, which dropped local_only entirely,
// so it lists them. Qt never selects that theme on its own, hence the override.
//
// Requires qt6-xdgdesktopportal-platformtheme (a Recommends of this package).
// If it is missing Qt falls through to gtk3, i.e. the previous behaviour, so
// tell users who cannot see a network location in the save dialog to install
// that package. Setting QT_QPA_PLATFORMTHEME yourself overrides this.
if(qEnvironmentVariableIsEmpty("QT_QPA_PLATFORMTHEME"))
qputenv("QT_QPA_PLATFORMTHEME", "xdgdesktopportal");
#endif

for(int i = 1; i < argc; ++i)
{
QString parameter(argv[i]);
Expand Down
1 change: 1 addition & 0 deletions debian/control
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ Depends:
${shlibs:Depends},
${misc:Depends}
Recommends:
qt6-xdgdesktopportal-platformtheme,
python3-nautilus:amd64 | python3-nautilus:arm64
Replaces:
qdigidoc (<< 3.14)
Expand Down
Loading