From: Peter Penz Date: Wed, 4 Nov 2009 21:37:12 +0000 (+0000) Subject: Install fileviewversioncontrolplugin.desktop as servicetype, so that version control... X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/commitdiff_plain/ee20ff929c199c40b1de0f3606ee8236160eadfb Install fileviewversioncontrolplugin.desktop as servicetype, so that version control plugins can be found by Dolphin. Open issue: The instantiation fails and the following errors are returned: dolphin(13505)/kdecore (KLibrary) kde4Factory: The library "/home/kde4peter/kde/lib/kde4/fileviewsvnplugin.so" does not offer a qt_plugin_instance function. dolphin(13505)/kdecore (KLibrary) kde3Factory: The library "/home/kde4peter/kde/lib/kde4/fileviewsvnplugin.so" does not offer an "init_fileviewsvnplugin" function. svn path=/trunk/KDE/kdebase/apps/; revision=1044902 --- diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index fb5a88413..e6ab669e9 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -107,6 +107,7 @@ install(TARGETS fileviewsvnplugin DESTINATION ${PLUGIN_INSTALL_DIR}) install(FILES dolphinpart.rc DESTINATION ${DATA_INSTALL_DIR}/dolphinpart) install(FILES dolphinpart.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) install(FILES fileviewsvnplugin.desktop DESTINATION ${SERVICES_INSTALL_DIR}) +install(FILES fileviewversioncontrolplugin.desktop DESTINATION ${SERVICETYPES_INSTALL_DIR}) ########################################## diff --git a/src/fileviewversioncontrolplugin.desktop b/src/fileviewversioncontrolplugin.desktop new file mode 100644 index 000000000..3e430af30 --- /dev/null +++ b/src/fileviewversioncontrolplugin.desktop @@ -0,0 +1,4 @@ +[Desktop Entry] +Type=ServiceType +X-KDE-ServiceType=FileViewVersionControlPlugin +Comment=Version Control Plugin for File Views diff --git a/src/versioncontrolobserver.cpp b/src/versioncontrolobserver.cpp index b20db9951..9dc7daa41 100644 --- a/src/versioncontrolobserver.cpp +++ b/src/versioncontrolobserver.cpp @@ -184,6 +184,7 @@ void VersionControlObserver::silentDirectoryVerification() m_dirVerificationTimer->start(); } +#include void VersionControlObserver::verifyDirectory() { KUrl versionControlUrl = m_dirLister->url(); @@ -191,13 +192,15 @@ void VersionControlObserver::verifyDirectory() return; } - if (m_plugin == 0) { - // TODO: does not work yet + if (m_plugin == 0) { + return; // TODO: does not work yet, m_plugin will always be 0 + + kDebug() << "Searching FileViewVersionControlPlugins..."; const KService::List plugins = KServiceTypeTrader::self()->query("FileViewVersionControlPlugin"); - for (KService::List::ConstIterator it = plugins.begin(); it != plugins.end(); ++it) { - // kDebug() << "plugin: " << (*it)->desktopEntryName(); + for (KService::List::ConstIterator it = plugins.constBegin(); it != plugins.constEnd(); ++it) { + kDebug() << "found plugin" << (*it)->desktopEntryName(); + m_plugin = (*it)->createInstance(); } - return; connect(m_plugin, SIGNAL(infoMessage(const QString&)), this, SIGNAL(infoMessage(const QString&)));