E5XML/PluginRepositoryReader.py

changeset 3113
2780e230f129
parent 3035
36e9f388958b
child 3142
55030c09e142
child 3160
209a07d7e401
--- a/E5XML/PluginRepositoryReader.py	Tue Nov 26 19:20:42 2013 +0100
+++ b/E5XML/PluginRepositoryReader.py	Wed Nov 27 19:58:37 2013 +0100
@@ -19,16 +19,17 @@
     """
     supportedVersions = ["4.1", "4.2"]
     
-    def __init__(self, device, dlg):
+    def __init__(self, device, entryCallback):
         """
         Constructor
         
         @param device reference to the I/O device to read from (QIODevice)
-        @param dlg reference to the plug-in repository dialog
+        @param entryCallback reference to a function to be called once the
+            data for a plug-in has been read (function)
         """
         XMLStreamReaderBase.__init__(self, device)
         
-        self.dlg = dlg
+        self.__entryCallback = entryCallback
         
         self.version = ""
     
@@ -72,10 +73,11 @@
         while not self.atEnd():
             self.readNext()
             if self.isEndElement() and self.name() == "Plugin":
-                self.dlg.addEntry(pluginInfo["name"], pluginInfo["short"],
-                                  pluginInfo["description"], pluginInfo["url"],
-                                  pluginInfo["author"], pluginInfo["version"],
-                                  pluginInfo["filename"], pluginInfo["status"])
+                self.__entryCallback(
+                    pluginInfo["name"], pluginInfo["short"],
+                    pluginInfo["description"], pluginInfo["url"],
+                    pluginInfo["author"], pluginInfo["version"],
+                    pluginInfo["filename"], pluginInfo["status"])
                 break
             
             if self.isStartElement():

eric ide

mercurial