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>
This commit is contained in:
parent
497f43c90f
commit
4c37b64411
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user