]> cloud.milkyroute.net Git - dolphin.git/commitdiff
Install fileviewversioncontrolplugin.desktop as servicetype, so that version control...
authorPeter Penz <peter.penz19@gmail.com>
Wed, 4 Nov 2009 21:37:12 +0000 (21:37 +0000)
committerPeter Penz <peter.penz19@gmail.com>
Wed, 4 Nov 2009 21:37:12 +0000 (21:37 +0000)
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

src/CMakeLists.txt
src/fileviewversioncontrolplugin.desktop [new file with mode: 0644]
src/versioncontrolobserver.cpp

index fb5a88413898755d9bd0135d0145ea3c764f285d..e6ab669e9b46ab1539bd209cf6481d0b282a6e1d 100644 (file)
@@ -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 (file)
index 0000000..3e430af
--- /dev/null
@@ -0,0 +1,4 @@
+[Desktop Entry]
+Type=ServiceType
+X-KDE-ServiceType=FileViewVersionControlPlugin
+Comment=Version Control Plugin for File Views
index b20db99514cd6577dcaf917b9aa6e1b7bf61a233..9dc7daa410da7ff0a72a7a3b5444f8064f5815ac 100644 (file)
@@ -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&)));