diff --git a/smb/CMakeLists.txt b/smb/CMakeLists.txt --- a/smb/CMakeLists.txt +++ b/smb/CMakeLists.txt @@ -53,6 +53,5 @@ ########### install files ############### install( FILES smb-network.desktop DESTINATION ${KDE_INSTALL_DATADIR}/konqueror/dirtree/remote ) -install( FILES smb.protocol DESTINATION ${KDE_INSTALL_KSERVICES5DIR} ) install( FILES smb-network.desktop DESTINATION ${KDE_INSTALL_DATADIR}/remoteview ) diff --git a/smb/kio_smb.cpp b/smb/kio_smb.cpp --- a/smb/kio_smb.cpp +++ b/smb/kio_smb.cpp @@ -35,6 +35,13 @@ Q_LOGGING_CATEGORY(KIO_SMB, "kio_smb") +// Pseudo plugin class to embed meta data +class KIOPluginForMetaData : public QObject +{ + Q_OBJECT + Q_PLUGIN_METADATA(IID "org.kde.kio.slave.smb" FILE "smb.json") +}; + bool needsEEXISTWorkaround() { /* There is an issue with some libsmbclient versions that return EEXIST @@ -110,3 +117,4 @@ return 0; } +#include "kio_smb.moc" diff --git a/smb/smb.json b/smb/smb.json new file mode 100644 --- /dev/null +++ b/smb/smb.json @@ -0,0 +1,33 @@ +{ + "KDE-KIO-Protocols": { + "smb": { + "Class": ":internet", + "Icon": "network-workgroup", + "X-DocPath": "kioslave5/smb/index.html", + "copyFromFile": true, + "copyToFile": true, + "deleting": true, + "exec": "kf5/kio/smb", + "input": "none", + "listing": [ + "Name", + "Type", + "Size", + "Date", + "Access", + "Owner", + "Group" + ], + "linking": false, + "makedir": true, + "maxInstances": 20, + "maxInstancesPerHost": 5, + "moving": true, + "output": "filesystem", + "protocol": "smb", + "opening": true, + "reading": true, + "writing": true + } + } +} diff --git a/smb/smb.protocol b/smb/smb.protocol deleted file mode 100644 --- a/smb/smb.protocol +++ /dev/null @@ -1,18 +0,0 @@ -[Protocol] -exec=kf5/kio/smb -protocol=smb -input=none -output=filesystem -listing=Name,Type,Size,Date,Access,Owner,Group -reading=true -writing=true -makedir=true -deleting=true -opening=true -moving=true -copyToFile=true -copyFromFile=true -maxInstances=20 -maxInstancesPerHost=5 -X-DocPath=kioslave5/smb/index.html -Icon=network-workgroup