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
Bluedevil
Commits
4f99bc3c
Commit
4f99bc3c
authored
Dec 06, 2020
by
Nicolas Fella
Browse files
Set amount in files for receiving file
This enables the nice finished notification with actions
parent
89fc0bc9
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/kded/receivefilejob.cpp
View file @
4f99bc3c
...
...
@@ -156,6 +156,8 @@ void ReceiveFileJob::slotAccept()
m_targetPath
=
FileReceiverSettings
::
self
()
->
saveUrl
().
adjusted
(
QUrl
::
StripTrailingSlash
);
m_targetPath
.
setPath
(
m_targetPath
.
path
()
+
QLatin1Char
(
'/'
)
+
m_transfer
->
name
());
setTotalAmount
(
Files
,
1
);
Q_EMIT
description
(
this
,
i18n
(
"Receiving file over Bluetooth"
),
QPair
<
QString
,
QString
>
(
i18nc
(
"File transfer origin"
,
"From"
),
m_deviceName
),
QPair
<
QString
,
QString
>
(
i18nc
(
"File transfer destination"
,
"To"
),
m_targetPath
.
toDisplayString
()));
...
...
@@ -188,6 +190,8 @@ void ReceiveFileJob::moveFinished(KJob *job)
QFile
::
remove
(
m_tempPath
);
}
setProcessedAmount
(
Files
,
1
);
// Delay emitResult to make sure notification is displayed even
// for very small files that are received instantly
QTimer
::
singleShot
(
500
,
this
,
[
this
]()
{
...
...
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