mirror of
https://gitlab.linphone.org/BC/public/linphone-desktop.git
synced 2026-01-25 15:58:16 +00:00
feat(ui/modules/Common/Form/Buttons/FileChooserButton): better file handling
This commit is contained in:
parent
80f964b2d5
commit
6aaf2124e1
1 changed files with 12 additions and 4 deletions
|
|
@ -71,16 +71,24 @@ TextField {
|
|||
id: fileDialog
|
||||
|
||||
folder: {
|
||||
if (!textField.selectedFile.length) {
|
||||
var selectedFile = textField.selectedFile
|
||||
|
||||
if (!selectedFile.length) {
|
||||
return ''
|
||||
}
|
||||
|
||||
return Utils.getUriFromSystemPath(Utils.dirname(textField.selectedFile))
|
||||
return Utils.getUriFromSystemPath(
|
||||
textField.selectFolder
|
||||
? selectedFile
|
||||
: Utils.dirname(selectedFile)
|
||||
)
|
||||
}
|
||||
|
||||
onAccepted: {
|
||||
textField.selectedFile = Utils.getSystemPathFromUri(fileUrl)
|
||||
textField.accepted(textField.selectedFile)
|
||||
var selectedFile = Utils.getSystemPathFromUri(fileUrl)
|
||||
|
||||
textField.selectedFile = selectedFile
|
||||
textField.accepted(selectedFile)
|
||||
}
|
||||
|
||||
onRejected: textField.rejected()
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue