A QApplication object needs to be instantiated for kio-kdeconnect to work on KDE Neon
Summary: kio-kdeconnect fails to start on KDE Neon because it does not instantiate a QApplication object BUG: 400178 Test Plan: Install on a KDE Neon 5.14 system or VM Pair an android phone Browse the phone's filesystem using dolphin Reviewers: #kde_connect, #frameworks, albertvaka Reviewed By: #kde_connect, albertvaka Subscribers: sredman, apol, jriddell, nicolasfella, albertvaka, kdeconnect Tags: #kde_connect Differential Revision: https://phabricator.kde.org/D16692
This commit is contained in:
parent
a3cce94666
commit
560e8638e8
4 changed files with 41 additions and 18 deletions
|
@ -17,5 +17,6 @@ target_link_libraries(kio_kdeconnect
|
||||||
)
|
)
|
||||||
|
|
||||||
########### install files ###############
|
########### install files ###############
|
||||||
install(TARGETS kio_kdeconnect DESTINATION ${PLUGIN_INSTALL_DIR})
|
set_target_properties(kio_kdeconnect PROPERTIES OUTPUT_NAME "kdeconnect")
|
||||||
install(FILES kdeconnect.protocol DESTINATION ${SERVICES_INSTALL_DIR})
|
set_target_properties(kio_kdeconnect PROPERTIES LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin/kf5/kio")
|
||||||
|
install(TARGETS kio_kdeconnect DESTINATION ${KDE_INSTALL_PLUGINDIR}/kf5/kio)
|
||||||
|
|
26
kio/kdeconnect.json
Normal file
26
kio/kdeconnect.json
Normal file
|
@ -0,0 +1,26 @@
|
||||||
|
{
|
||||||
|
"KDE-KIO-Protocols": {
|
||||||
|
"kdeconnect": {
|
||||||
|
"Class": ":internet",
|
||||||
|
"Icon": "kdeconnect",
|
||||||
|
"copyFromFile": false,
|
||||||
|
"copyToFile": false,
|
||||||
|
"deleting": false,
|
||||||
|
"exec": "kdeconnect",
|
||||||
|
"input": "none",
|
||||||
|
"listing": [
|
||||||
|
"Name",
|
||||||
|
"Type",
|
||||||
|
"Access",
|
||||||
|
""
|
||||||
|
],
|
||||||
|
"makedir": false,
|
||||||
|
"maxInstances": 2,
|
||||||
|
"moving": false,
|
||||||
|
"output": "filesystem",
|
||||||
|
"protocol": "kdeconnect",
|
||||||
|
"reading": true,
|
||||||
|
"writing": false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -1,16 +0,0 @@
|
||||||
[Protocol]
|
|
||||||
exec=kio_kdeconnect
|
|
||||||
protocol=kdeconnect
|
|
||||||
input=none
|
|
||||||
output=filesystem
|
|
||||||
copyToFile=false
|
|
||||||
copyFromFile=false
|
|
||||||
listing=Name,Type,Access
|
|
||||||
reading=true
|
|
||||||
writing=false
|
|
||||||
makedir=false
|
|
||||||
deleting=false
|
|
||||||
moving=false
|
|
||||||
Icon=kdeconnect
|
|
||||||
maxInstances=2
|
|
||||||
|
|
|
@ -27,11 +27,21 @@
|
||||||
#include <KLocalizedString>
|
#include <KLocalizedString>
|
||||||
|
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
|
#include <QtPlugin>
|
||||||
|
|
||||||
Q_LOGGING_CATEGORY(KDECONNECT_KIO, "kdeconnect.kio")
|
Q_LOGGING_CATEGORY(KDECONNECT_KIO, "kdeconnect.kio")
|
||||||
|
|
||||||
|
class KIOPluginForMetaData : public QObject
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
Q_PLUGIN_METADATA(IID "org.kde.kio.slave.kdeconnect" FILE "kdeconnect.json")
|
||||||
|
};
|
||||||
|
|
||||||
extern "C" int Q_DECL_EXPORT kdemain(int argc, char** argv)
|
extern "C" int Q_DECL_EXPORT kdemain(int argc, char** argv)
|
||||||
{
|
{
|
||||||
|
QCoreApplication app(argc, argv);
|
||||||
|
app.setApplicationName(QStringLiteral("kio_kdeconnect"));
|
||||||
|
|
||||||
if (argc != 4) {
|
if (argc != 4) {
|
||||||
fprintf(stderr, "Usage: kio_kdeconnect protocol pool app\n");
|
fprintf(stderr, "Usage: kio_kdeconnect protocol pool app\n");
|
||||||
exit(-1);
|
exit(-1);
|
||||||
|
@ -232,3 +242,5 @@ void KioKdeconnect::setHost(const QString& hostName, quint16 port, const QString
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//needed for JSON file embedding
|
||||||
|
#include "kiokdeconnect.moc"
|
||||||
|
|
Loading…
Reference in a new issue