Mailinglist Archive: zypp-commit (149 mails)

< Previous Next >
[zypp-commit] r5442 - in /branches/work/updater-kde-refactoring/updater-kde/updater: CMakeLists.txt UpdaterApplication.cpp zypp/ZYppUpdater.cpp
  • From: tgoettlicher@xxxxxxxxxxxxxxxx
  • Date: Wed, 25 Apr 2007 11:36:01 -0000
  • Message-id: <20070425113602.39F724740B@xxxxxxxxxxxxxxxx>
Author: tgoettlicher
Date: Wed Apr 25 13:36:01 2007
New Revision: 5442

URL: http://svn.opensuse.org/viewcvs/zypp?rev=5442&view=rev
Log:
First steps in plugin support


Modified:
    branches/work/updater-kde-refactoring/updater-kde/updater/CMakeLists.txt
    branches/work/updater-kde-refactoring/updater-kde/updater/UpdaterApplication.cpp
    branches/work/updater-kde-refactoring/updater-kde/updater/zypp/ZYppUpdater.cpp

Modified: branches/work/updater-kde-refactoring/updater-kde/updater/CMakeLists.txt
URL: http://svn.opensuse.org/viewcvs/zypp/branches/work/updater-kde-refactoring/updater-kde/updater/CMakeLists.txt?rev=5442&r1=5441&r2=5442&view=diff
==============================================================================
--- branches/work/updater-kde-refactoring/updater-kde/updater/CMakeLists.txt (original)
+++ branches/work/updater-kde-refactoring/updater-kde/updater/CMakeLists.txt Wed Apr 25 13:36:01 2007
@@ -1,5 +1,5 @@
 #ADD_SUBDIRECTORY( zmd ) 
-#ADD_SUBDIRECTORY( zypp ) 
+ADD_SUBDIRECTORY( zypp ) 
 
 INCLUDE_DIRECTORIES( ${CMAKE_SOURCE_DIR}/kxmlrpcclient ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR} ${KDE3_INCLUDE_DIR} ${QT_INCLUDE_DIR}  )
 

Modified: branches/work/updater-kde-refactoring/updater-kde/updater/UpdaterApplication.cpp
URL: http://svn.opensuse.org/viewcvs/zypp/branches/work/updater-kde-refactoring/updater-kde/updater/UpdaterApplication.cpp?rev=5442&r1=5441&r2=5442&view=diff
==============================================================================
--- branches/work/updater-kde-refactoring/updater-kde/updater/UpdaterApplication.cpp (original)
+++ branches/work/updater-kde-refactoring/updater-kde/updater/UpdaterApplication.cpp Wed Apr 25 13:36:01 2007
@@ -64,20 +64,49 @@
 
 void UpdaterApplication::loadPlugins()
 {
+
+  kdDebug() << "Searching for plugins ..." << endl;
+
   KTrader::OfferList offers = KTrader::self()->query("openSUSEUpdater/Backend");
 
   KTrader::OfferList::ConstIterator iter;
   for(iter = offers.begin(); iter != offers.end(); ++iter )
   {
     KService::Ptr service = *iter;
+    kdDebug() << " - Plugin: " << service->name() << endl;
+
     int errCode = 0;
     Updater* plugin = KParts::ComponentFactory::createInstanceFromService<Updater> ( service, 0, 0, QStringList(), &errCode);
-    // here we ought to check the error code.
 
     if (plugin) {
       //guiFactory()->addClient(plugin);
       kdDebug() << "PluginDemo: Loaded plugin " << plugin->name() << endl;
     }
+    else 
+    {
+      switch (errCode)
+      {
+        case KParts::ComponentFactory::ErrNoServiceFound :
+          kdDebug() << " ! ErrNoServiceFound" << endl;
+          break;
+
+        case KParts::ComponentFactory::ErrServiceProvidesNoLibrary :
+          kdDebug() << " ! ErrServiceProvidesNoLibrary" << endl;
+          break;
+
+        case KParts::ComponentFactory::ErrNoLibrary : 
+          kdDebug() << " ! ErrNoLibrary: " <<  KLibLoader::self()->lastErrorMessage() << endl;
+          break;
+
+        case KParts::ComponentFactory::ErrNoFactory :         
+          kdDebug() << " ! ErrNoFactory" << endl;
+          break;
+
+        case KParts::ComponentFactory::ErrNoComponent :        
+          kdDebug() << " ! ErrNoComponent" << endl;
+          break;
+      }
+    }
   }
 }
 

Modified: branches/work/updater-kde-refactoring/updater-kde/updater/zypp/ZYppUpdater.cpp
URL: http://svn.opensuse.org/viewcvs/zypp/branches/work/updater-kde-refactoring/updater-kde/updater/zypp/ZYppUpdater.cpp?rev=5442&r1=5441&r2=5442&view=diff
==============================================================================
--- branches/work/updater-kde-refactoring/updater-kde/updater/zypp/ZYppUpdater.cpp (original)
+++ branches/work/updater-kde-refactoring/updater-kde/updater/zypp/ZYppUpdater.cpp Wed Apr 25 13:36:01 2007
@@ -28,6 +28,7 @@
 #include <qlistview.h>
 #include <qobject.h>
 #include <qpopupmenu.h>
+#include <qtimer.h>
 
 #include <kglobal.h>
 #include <dcopclient.h>

--
To unsubscribe, e-mail: zypp-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: zypp-commit+help@xxxxxxxxxxxx

< Previous Next >
This Thread
  • No further messages