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
Plasma Integration
Commits
35fa7f4a
Verified
Commit
35fa7f4a
authored
Sep 26, 2020
by
Jonah Brüchert
Browse files
QXdgDesktopPortalFileDialog: pass directory option to portal
parent
297f8bfa
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/platformtheme/qxdgdesktopportalfiledialog.cpp
View file @
35fa7f4a
...
...
@@ -109,6 +109,7 @@ public:
WId
winId
=
0
;
bool
modal
=
false
;
bool
multipleFiles
=
false
;
bool
selectDirectory
=
false
;
bool
saveFile
=
false
;
QString
acceptLabel
;
QString
directory
;
...
...
@@ -145,6 +146,10 @@ void QXdgDesktopPortalFileDialog::initializeDialog()
if
(
options
()
->
fileMode
()
==
QFileDialogOptions
::
ExistingFiles
)
d
->
multipleFiles
=
true
;
if
(
options
()
->
fileMode
()
==
QFileDialogOptions
::
Directory
||
options
()
->
fileMode
()
==
QFileDialogOptions
::
DirectoryOnly
)
{
d
->
selectDirectory
=
true
;
}
if
(
options
()
->
isLabelExplicitlySet
(
QFileDialogOptions
::
Accept
))
d
->
acceptLabel
=
options
()
->
labelText
(
QFileDialogOptions
::
Accept
);
...
...
@@ -179,6 +184,7 @@ void QXdgDesktopPortalFileDialog::openPortal()
options
.
insert
(
QLatin1String
(
"modal"
),
d
->
modal
);
options
.
insert
(
QLatin1String
(
"multiple"
),
d
->
multipleFiles
);
options
.
insert
(
QLatin1String
(
"directory"
),
d
->
selectDirectory
);
if
(
d
->
saveFile
)
{
if
(
!
d
->
directory
.
isEmpty
())
...
...
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