[Kst] kdeextragear-2/kst/kst

George Staikos staikos at kde.org
Mon May 12 23:06:59 CEST 2003


CVS commit by staikos: 

plugin loader added (untested)


  A            pluginloader.cpp   1.1
  A            pluginloader.h   1.1
  M +1 -0      Makefile.am   1.10
  M +7 -0      plugin.cpp   1.4
  M +14 -1     plugin.h   1.4
  M +3 -0      pluginxmlparser.h   1.3


--- kdeextragear-2/kst/kst/Makefile.am  #1.9:1.10
@@ -20,4 +20,5 @@
         plugin.cpp \
         pluginxmlparser.cpp \
+        pluginloader.cpp \
         kstbasevectorlist.cpp \
         kstdatamanager_i.cpp \

--- kdeextragear-2/kst/kst/plugin.cpp  #1.3:1.4
@@ -19,10 +19,17 @@
 #include "plugin.h"
 
+#include <klibloader.h>
+
 
 Plugin::Plugin() {
+  _lib = 0L;
 }
 
 
 Plugin::~Plugin() {
+  if (_lib) {
+    _lib->unload();  // this deletes it too
+    _lib = 0L;
+  }
 }
 

--- kdeextragear-2/kst/kst/plugin.h  #1.3:1.4
@@ -16,4 +16,6 @@
  ***************************************************************************/
 
+#ifndef _KST_PLUGIN_H
+#define _KST_PLUGIN_H
 
 #include <qmap.h>
@@ -25,8 +27,13 @@ class PluginData {
 public:
 
+  /**
+   *   Clear all values.
+   */
   void clear();
 
 
-
+  /**
+   *   Types use by this class.
+   */
   typedef enum { Unknown, PreAlpha, Alpha, Beta, Release } PluginState;
   typedef enum { String, Integer } ParameterTypes;
@@ -72,4 +79,7 @@ public:
 
 
+
+class KLibrary;
+
 class Plugin {
 friend class PluginLoader;
@@ -83,7 +93,10 @@ protected:
 
   PluginData _data;
+
+  KLibrary *_lib;
 };
 
 
+#endif
 
 // vim: ts=2 sw=2 et

--- kdeextragear-2/kst/kst/pluginxmlparser.h  #1.2:1.3
@@ -16,4 +16,6 @@
  ***************************************************************************/
 
+#ifndef _PLUGINXMLPARSER_H
+#define _PLUGINXMLPARSER_H
 
 #include "plugin.h"
@@ -49,4 +51,5 @@ private:
 };
 
+#endif
 
 // vim: ts=2 sw=2 et




More information about the Kst mailing list