[Kst] branches/work/kst/pluginify/kst/src/libkstapp

Adam Treat treat at kde.org
Tue Sep 12 19:25:53 CEST 2006


SVN commit 583570 by treat:

* Don't require a 'newplugin' tag.  Instead, test for 
a 'name' attribute and if it exists assume that this is
a new KDE style plugin.  If not, then assume this is an
old C style plugin.


 M  +5 -6      kstdoc.cpp  


--- branches/work/kst/pluginify/kst/src/libkstapp/kstdoc.cpp #583569:583570
@@ -380,13 +380,12 @@
         avector = new KstAVector(e);
         KST::addVectorToList(KstVectorPtr(avector));
       } else if (e.tagName() == "plugin") {
-        KstDataObjectPtr p = new KstPlugin(e);
-        KstWriteLocker dowl(&KST::dataObjectList.lock());
-        KST::dataObjectList.append(p);
-      } else if (e.tagName() == "newplugin") {
         const QString name = e.attribute("name");
-        Q_ASSERT( !name.isEmpty() );
-        KstDataObjectPtr p = KstDataObject::createPlugin(name, e);
+        KstDataObjectPtr p;
+        if ( name.isEmpty() )
+          p = new KstPlugin(e);
+        else
+          p = KstDataObject::createPlugin(name, e);
         KstWriteLocker dowl(&KST::dataObjectList.lock());
         KST::dataObjectList.append(p);
       } else if (e.tagName() == "curve") {


More information about the Kst mailing list