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
Network
KDE Connect
Commits
ea8ed5c4
Commit
ea8ed5c4
authored
Jul 03, 2021
by
Piyush Aggarwal
🎮
Browse files
kdeconnect-handler: auto select the sendFile radio button if url is actually a local file
parent
e683dd21
Pipeline
#68324
passed with stage
in 4 minutes and 39 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
urlhandler/kdeconnect-handler.cpp
View file @
ea8ed5c4
...
...
@@ -111,6 +111,13 @@ int main(int argc, char** argv)
}
});
QObject
::
connect
(
urlRequester
,
&
KUrlRequester
::
textChanged
,
[
urlRequester
,
&
uidialog
](
const
QString
&
newUrl
)
{
bool
isLocalFileUrl
=
QFileInfo
(
newUrl
).
exists
()
&&
QFileInfo
(
newUrl
).
isFile
();
// we don't support sending directories yet!
uidialog
.
sendFileRadioButton
->
setChecked
(
isLocalFileUrl
);
uidialog
.
sendUrlRadioButton
->
setChecked
(
!
isLocalFileUrl
);
});
if
(
!
urlToShare
.
isEmpty
())
{
uidialog
.
sendUrlRadioButton
->
setVisible
(
false
);
uidialog
.
sendFileRadioButton
->
setVisible
(
false
);
...
...
Write
Preview
Markdown
is supported
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