┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPeter Penz <[email protected]>2009-11-04 21:37:12 +0000
committerPeter Penz <[email protected]>2009-11-04 21:37:12 +0000
commitee20ff929c199c40b1de0f3606ee8236160eadfb (patch)
tree09896121e1598e38bd37913076303bbc9daa90da /src
parent565bd3bf23dfb9b139de089d3c4f8b57e124f7ee (diff)
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
Diffstat (limited to 'src')
-rw-r--r--src/CMakeLists.txt1
-rw-r--r--src/fileviewversioncontrolplugin.desktop4
-rw-r--r--src/versioncontrolobserver.cpp13
3 files changed, 13 insertions, 5 deletions
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 <kdebug.h>
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<KVersionControlPlugin>();
}
- return;
connect(m_plugin, SIGNAL(infoMessage(const QString&)),
this, SIGNAL(infoMessage(const QString&)));