Commit d7f03eaf authored by Tobias Fella's avatar Tobias Fella
Browse files

Port to KPluginLoader

Change the plugin installation path to ${QT_PLUGIN_PATH}/dolphin/vcs
parent 6bc584ea
......@@ -3,7 +3,9 @@ project(fileviewbazaarplugin)
add_definitions(-DTRANSLATION_DOMAIN=\"fileviewbazaarplugin\")
set(fileviewbazaarplugin_SRCS fileviewbazaarplugin.cpp)
add_library(fileviewbazaarplugin MODULE ${fileviewbazaarplugin_SRCS})
kcoreaddons_add_plugin(fileviewbazaarplugin SOURCES fileviewbazaarplugin.cpp INSTALL_NAMESPACE "dolphin/vcs")
target_link_libraries(fileviewbazaarplugin
KF5::KIOCore
KF5::I18n
......@@ -11,5 +13,4 @@ target_link_libraries(fileviewbazaarplugin
DolphinVcs
)
install(FILES fileviewbazaarplugin.desktop DESTINATION ${KDE_INSTALL_KSERVICES5DIR})
install(TARGETS fileviewbazaarplugin DESTINATION ${KDE_INSTALL_PLUGINDIR})
kcoreaddons_desktop_to_json(fileviewbazaarplugin fileviewbazaarplugin.desktop)
......@@ -33,7 +33,7 @@
#include <QStringList>
#include <QTextStream>
K_PLUGIN_FACTORY(FileViewBazaarPluginFactory, registerPlugin<FileViewBazaarPlugin>();)
K_PLUGIN_CLASS_WITH_JSON(FileViewBazaarPlugin, "fileviewbazaarplugin.json")
K_EXPORT_PLUGIN_VERSION(2)
FileViewBazaarPlugin::FileViewBazaarPlugin(QObject* parent, const QList<QVariant>& args) :
......
......@@ -6,7 +6,8 @@ set(fileviewdropboxplugin_SRCS
fileviewdropboxplugin.cpp
)
add_library(fileviewdropboxplugin MODULE ${fileviewdropboxplugin_SRCS})
kcoreaddons_add_plugin(fileviewdropboxplugin SOURCES fileviewdropboxplugin.cpp INSTALL_NAMESPACE "dolphin/vcs")
target_link_libraries(fileviewdropboxplugin
Qt5::Core
Qt5::Widgets
......@@ -17,5 +18,4 @@ target_link_libraries(fileviewdropboxplugin
DolphinVcs
)
install(FILES fileviewdropboxplugin.desktop DESTINATION ${KDE_INSTALL_KSERVICES5DIR})
install(TARGETS fileviewdropboxplugin DESTINATION ${KDE_INSTALL_PLUGINDIR})
kcoreaddons_desktop_to_json(fileviewdropboxplugin fileviewdropboxplugin.desktop)
......@@ -34,7 +34,7 @@
#include <QFileSystemWatcher>
#include <QStringBuilder>
K_PLUGIN_FACTORY(FileViewDropboxPluginFactory, registerPlugin<FileViewDropboxPlugin>();)
K_PLUGIN_CLASS_WITH_JSON(FileViewDropboxPlugin, "fileviewdropboxplugin.json")
K_EXPORT_PLUGIN_VERSION(2)
class FileViewDropboxPlugin::Private
......
......@@ -16,7 +16,8 @@ kconfig_add_kcfg_files(fileviewgitplugin_SRCS
fileviewgitpluginsettings.kcfgc
)
add_library(fileviewgitplugin MODULE ${fileviewgitplugin_SRCS})
kcoreaddons_add_plugin(fileviewgitplugin SOURCES ${fileviewgitplugin_SRCS} INSTALL_NAMESPACE "dolphin/vcs")
target_link_libraries(fileviewgitplugin
Qt5::Core
Qt5::Widgets
......@@ -28,6 +29,6 @@ target_link_libraries(fileviewgitplugin
DolphinVcs
)
install(FILES fileviewgitplugin.desktop DESTINATION ${KDE_INSTALL_KSERVICES5DIR})
kcoreaddons_desktop_to_json(fileviewgitplugin fileviewgitplugin.desktop)
install(FILES fileviewgitpluginsettings.kcfg DESTINATION ${KCFG_INSTALL_DIR})
install(TARGETS fileviewgitplugin DESTINATION ${KDE_INSTALL_PLUGINDIR})
......@@ -39,7 +39,7 @@
#include <QDir>
#include <QTextBrowser>
K_PLUGIN_FACTORY(FileViewGitPluginFactory, registerPlugin<FileViewGitPlugin>();)
K_PLUGIN_CLASS_WITH_JSON(FileViewGitPlugin, "fileviewgitplugin.json")
K_EXPORT_PLUGIN_VERSION(2);
FileViewGitPlugin::FileViewGitPlugin(QObject* parent, const QList<QVariant>& args) :
......
......@@ -45,7 +45,8 @@ kconfig_add_kcfg_files(fileviewhgplugin_SRCS
fileviewhgpluginsettings.kcfgc
)
add_library(fileviewhgplugin MODULE ${fileviewhgplugin_SRCS})
kcoreaddons_add_plugin(fileviewhgplugin SOURCES ${fileviewhgplugin_SRCS} INSTALL_NAMESPACE "dolphin/vcs")
target_link_libraries(fileviewhgplugin
Qt5::Core
Qt5::Widgets
......@@ -57,8 +58,7 @@ target_link_libraries(fileviewhgplugin
DolphinVcs
)
install(FILES fileviewhgplugin.desktop DESTINATION ${KDE_INSTALL_KSERVICES5DIR})
kcoreaddons_desktop_to_json(fileviewhgplugin fileviewhgplugin.desktop)
install(FILES fileviewhgpluginsettings.kcfg DESTINATION ${KCFG_INSTALL_DIR})
install(TARGETS fileviewhgplugin DESTINATION ${KDE_INSTALL_PLUGINDIR})
......@@ -55,10 +55,9 @@
#include <KLocalizedString>
#include <KPluginFactory>
K_PLUGIN_FACTORY(FileViewHgPluginFactory, registerPlugin<FileViewHgPlugin>();)
K_PLUGIN_CLASS_WITH_JSON(FileViewHgPlugin, "fileviewhgplugin.json")
K_EXPORT_PLUGIN_VERSION(2)
//TODO: Build a proper status signal system to sync HgWrapper/Dialogs with this
//TODO: Show error messages and set their message appropriately(hg output)
//TODO: Use xi18nc rather than i18c throughout plugin
......
......@@ -18,7 +18,8 @@ kconfig_add_kcfg_files(fileviewsvnplugin_SRCS
fileviewsvnpluginsettings.kcfgc
)
add_library(fileviewsvnplugin MODULE ${fileviewsvnplugin_SRCS})
kcoreaddons_add_plugin(fileviewsvnplugin SOURCES ${fileviewsvnplugin_SRCS} INSTALL_NAMESPACE "dolphin/vcs")
target_link_libraries(fileviewsvnplugin
Qt5::Core
Qt5::Widgets
......@@ -29,6 +30,6 @@ target_link_libraries(fileviewsvnplugin
DolphinVcs
)
install(FILES fileviewsvnplugin.desktop DESTINATION ${KDE_INSTALL_KSERVICES5DIR})
kcoreaddons_desktop_to_json(fileviewsvnplugin fileviewsvnplugin.desktop)
install(FILES fileviewsvnpluginsettings.kcfg DESTINATION ${KCFG_INSTALL_DIR})
install(TARGETS fileviewsvnplugin DESTINATION ${KDE_INSTALL_PLUGINDIR})
......@@ -51,7 +51,7 @@
#include "svncommands.h"
K_PLUGIN_FACTORY(FileViewSvnPluginFactory, registerPlugin<FileViewSvnPlugin>();)
K_PLUGIN_CLASS_WITH_JSON(FileViewSvnPlugin, "fileviewsvnplugin.json")
K_EXPORT_PLUGIN_VERSION(2)
FileViewSvnPlugin::FileViewSvnPlugin(QObject* parent, const QList<QVariant>& args) :
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment