Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Network
KDE Connect
Commits
dda59018
Commit
dda59018
authored
Aug 12, 2020
by
Nicolas Fella
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Port away from KMimeTypeTrader
It is about to be deprecated See
https://phabricator.kde.org/T12177
parent
0b3d6bee
Pipeline
#30381
passed with stage
in 11 minutes and 53 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
plugins/share/shareplugin.cpp
plugins/share/shareplugin.cpp
+3
-3
No files found.
plugins/share/shareplugin.cpp
View file @
dda59018
...
...
@@ -33,7 +33,7 @@
#include <KPluginFactory>
#include <KIO/Job>
#include <KIO/MkpathJob>
#include <K
MimeType
Trader>
#include <K
Application
Trader>
#include <KFileUtils>
#include "core/filetransferjob.h"
...
...
@@ -123,7 +123,7 @@ bool SharePlugin::receivePacket(const NetworkPacket& np)
if
(
np
.
hasPayload
())
{
qint64
dateModified
=
np
.
get
<
qint64
>
(
QStringLiteral
(
"lastModified"
),
QDateTime
::
currentMSecsSinceEpoch
());
const
bool
open
=
np
.
get
<
bool
>
(
QStringLiteral
(
"open"
),
false
);
if
(
!
m_compositeJob
)
{
m_compositeJob
=
new
CompositeFileTransferJob
(
device
()
->
id
());
KIO
::
getJobTracker
()
->
registerJob
(
m_compositeJob
);
...
...
@@ -145,7 +145,7 @@ bool SharePlugin::receivePacket(const NetworkPacket& np)
}
else
if
(
np
.
has
(
QStringLiteral
(
"text"
)))
{
QString
text
=
np
.
get
<
QString
>
(
QStringLiteral
(
"text"
));
KService
::
Ptr
service
=
K
MimeTypeTrader
::
self
()
->
preferredService
(
QStringLiteral
(
"text/plain"
));
KService
::
Ptr
service
=
K
ApplicationTrader
::
preferredService
(
QStringLiteral
(
"text/plain"
));
const
QString
defaultApp
=
service
?
service
->
desktopEntryName
()
:
QString
();
if
(
defaultApp
==
QLatin1String
(
"org.kde.kate"
)
||
defaultApp
==
QLatin1String
(
"org.kde.kwrite"
))
{
...
...
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