Skip to content
GitLab
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
9cad7766
Verified
Commit
9cad7766
authored
Apr 01, 2022
by
Jonah Brüchert
🍪
Browse files
Support fuse on mobile filechooser as well
parent
bbfa7471
Pipeline
#157933
passed with stage
in 51 seconds
Changes
4
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
src/filechooser.cpp
View file @
9cad7766
...
...
@@ -302,7 +302,7 @@ uint FileChooserPortal::OpenFile(const QDBusObjectPath &handle,
uint
retCode
=
m_mobileFileDialog
->
exec
();
results
.
insert
(
QStringLiteral
(
"uris"
),
m_mobileFileDialog
->
results
());
results
.
insert
(
QStringLiteral
(
"uris"
),
fuseRedirect
(
m_mobileFileDialog
->
results
())
)
;
return
retCode
;
}
...
...
@@ -487,7 +487,7 @@ uint FileChooserPortal::SaveFile(const QDBusObjectPath &handle,
uint
retCode
=
m_mobileFileDialog
->
exec
();
results
.
insert
(
QStringLiteral
(
"uris"
),
m_mobileFileDialog
->
results
());
results
.
insert
(
QStringLiteral
(
"uris"
),
fuseRedirect
(
m_mobileFileDialog
->
results
())
)
;
return
retCode
;
}
...
...
src/kirigami-filepicker/api/mobilefiledialog.cpp
View file @
9cad7766
...
...
@@ -185,10 +185,8 @@ uint MobileFileDialog::exec()
bool
handled
=
false
;
uint
exitCode
=
0
;
const
auto
acceptedConn
=
connect
(
m_callback
,
&
FileChooserQmlCallback
::
accepted
,
this
,
[
this
,
&
exitCode
,
&
handled
](
const
QStringList
&
urls
)
{
for
(
const
auto
&
filename
:
urls
)
{
m_results
<<
QUrl
(
filename
).
toDisplayString
();
}
const
auto
acceptedConn
=
connect
(
m_callback
,
&
FileChooserQmlCallback
::
accepted
,
this
,
[
this
,
&
exitCode
,
&
handled
](
const
QList
<
QUrl
>
&
urls
)
{
m_results
=
urls
;
handled
=
true
;
exitCode
=
0
;
qDebug
(
KirigamiFilepicker
)
<<
"Got results"
<<
m_results
;
...
...
@@ -216,7 +214,7 @@ uint MobileFileDialog::exec()
return
exitCode
;
}
Q
StringList
MobileFileDialog
::
results
()
const
Q
List
<
QUrl
>
MobileFileDialog
::
results
()
const
{
return
m_results
;
}
src/kirigami-filepicker/api/mobilefiledialog.h
View file @
9cad7766
...
...
@@ -46,12 +46,12 @@ public:
bool
selectFolder
()
const
;
void
setSelectFolder
(
bool
selectFolder
);
Q
StringList
results
()
const
;
Q
List
<
QUrl
>
results
()
const
;
uint
exec
();
Q_SIGNALS:
void
accepted
(
const
Q
StringList
&
files
);
void
accepted
(
const
Q
List
<
QUrl
>
&
files
);
void
titleChanged
();
void
selectMultipleChanged
();
void
selectExistingChanged
();
...
...
@@ -65,7 +65,7 @@ Q_SIGNALS:
private:
QQmlApplicationEngine
*
m_engine
;
FileChooserQmlCallback
*
m_callback
;
Q
StringList
m_results
;
Q
List
<
QUrl
>
m_results
;
QQuickWindow
*
m_window
;
bool
m_customTitleSet
;
...
...
src/kirigami-filepicker/declarative/filechooserqmlcallback.h
View file @
9cad7766
...
...
@@ -52,7 +52,7 @@ public:
void
setSelectFolder
(
bool
selectFolder
);
Q_SIGNALS:
void
accepted
(
const
Q
StringList
&
files
);
void
accepted
(
const
Q
List
<
QUrl
>
&
files
);
void
cancel
();
void
titleChanged
();
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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