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
Network
KDE Connect
Commits
19b8249e
Commit
19b8249e
authored
Mar 10, 2022
by
Albert Vaca Cintora
Browse files
Changes as per CR
parent
58adbc8c
Pipeline
#147870
passed with stage
in 3 minutes and 3 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
plugins/share/shareplugin.cpp
View file @
19b8249e
...
...
@@ -203,12 +203,12 @@ void SharePlugin::shareUrl(const QUrl& url, bool open)
NetworkPacket
packet
(
PACKET_TYPE_SHARE_REQUEST
);
if
(
url
.
isLocalFile
())
{
QSharedPointer
<
QFile
>
ioFile
(
new
QFile
(
url
.
toLocalFile
()));
QFileInfo
info
(
*
ioFile
);
if
(
!
ioFile
->
exists
())
{
Daemon
::
instance
()
->
reportError
(
i18n
(
"Could not share file"
),
i18n
(
"%1 does not exist"
,
url
.
toLocalFile
()));
return
;
}
else
{
QFileInfo
info
(
*
ioFile
);
packet
.
setPayload
(
ioFile
,
ioFile
->
size
());
packet
.
set
<
QString
>
(
QStringLiteral
(
"filename"
),
QUrl
(
url
).
fileName
());
packet
.
set
<
qint64
>
(
QStringLiteral
(
"creationTime"
),
info
.
birthTime
().
toMSecsSinceEpoch
());
...
...
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