Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Plasma
KDE Portal for XDG Desktop
Commits
5094b7e0
Commit
5094b7e0
authored
Sep 26, 2020
by
Jonah Brüchert
Committed by
Nicolas Fella
Oct 13, 2020
Browse files
mobile filechooser: Make sure to also return the right folder when the folder wasn't changed
parent
2f254a3b
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/kirigami-filepicker/declarative/FilePicker.qml
View file @
5094b7e0
...
...
@@ -115,7 +115,13 @@ Kirigami.ScrollablePage {
text
:
root
.
acceptLabel
?
root
.
acceptLabel
:
i18n
(
"
Select
"
)
icon.name
:
"
dialog-ok
"
onTriggered
:
root
.
accepted
(
root
.
fileUrls
)
onTriggered
:
{
if
(
root
.
selectFolder
)
{
root
.
accepted
([
dirModel
.
folder
])
}
else
{
root
.
accepted
(
root
.
fileUrls
)
}
}
}
DirModel
{
...
...
@@ -156,14 +162,6 @@ Kirigami.ScrollablePage {
if
(
root
.
selectExisting
)
{
// The delegate being clicked on represents a directory
if
(
isDir
)
{
// If we want to select a folder,
// store the folder being clicked on in the output variable,
// so it is ready once accepted() is emitted by pressing
// the corrosponding button
if
(
root
.
selectFolder
)
{
root
.
fileUrls
=
[
url
]
}
// Change into folder
dirModel
.
folder
=
url
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment