diff options
author | Jan Grulich <jgrulich@redhat.com> | 2018-10-18 10:02:48 +0200 |
---|---|---|
committer | Jan Grulich <jgrulich@redhat.com> | 2018-10-31 09:58:52 +0000 |
commit | 4c37b64411f60d2667963db8e7d42459cad663e6 (patch) | |
tree | d9d3a3af779ad2fe480375895634b597e40b1e63 | |
parent | 497f43c90f7160c1b198d829eab21c8c010fc7f8 (diff) |
Add terminating character when sending byte arrays in FileChooser portal
Terminating character is needed for gtk portal backend, which is not
able to contruct a string without it and thus not able to pre-select a
file or a directory in file dialog.
Change-Id: I5b40fb1ce584936fc92e93f38dc8559890852d99
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
-rw-r--r-- | src/plugins/platformthemes/xdgdesktopportal/qxdgdesktopportalfiledialog.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/plugins/platformthemes/xdgdesktopportal/qxdgdesktopportalfiledialog.cpp b/src/plugins/platformthemes/xdgdesktopportal/qxdgdesktopportalfiledialog.cpp index cda267d24b..5e94d1558e 100644 --- a/src/plugins/platformthemes/xdgdesktopportal/qxdgdesktopportalfiledialog.cpp +++ b/src/plugins/platformthemes/xdgdesktopportal/qxdgdesktopportalfiledialog.cpp @@ -181,10 +181,10 @@ void QXdgDesktopPortalFileDialog::openPortal() if (d->saveFile) { if (!d->directory.isEmpty()) - options.insert(QLatin1String("current_folder"), d->directory.toLatin1()); + options.insert(QLatin1String("current_folder"), d->directory.toLatin1().append('\0')); if (!d->selectedFiles.isEmpty()) - options.insert(QLatin1String("current_file"), d->selectedFiles.first().toLatin1()); + options.insert(QLatin1String("current_file"), d->selectedFiles.first().toLatin1().append('\0')); } // Insert filters |