diff plugin/PluginInstance.cpp @ 57:7439f1696314

* Add editing for auralisation plugin parameters and programs * Rename and reorganise the sample plugin sample set
author Chris Cannam
date Thu, 23 Mar 2006 15:49:41 +0000
parents 2157fa46c1e7
children
line wrap: on
line diff
--- a/plugin/PluginInstance.cpp	Wed Mar 22 17:38:29 2006 +0000
+++ b/plugin/PluginInstance.cpp	Thu Mar 23 15:49:41 2006 +0000
@@ -91,6 +91,10 @@
         QString name = QString("param-%1")
             .arg(stripInvalidParameterNameCharacters
                  (QString(i->name.c_str())));
+        if (attrs.value(name) == "") {
+            std::cerr << "PluginInstance::setParameters: no parameter \"" << i->name << "\" (attribute \"" << name.toStdString() << "\")" << std::endl;
+            continue;
+        }
         bool ok;
         float value = attrs.value(name).trimmed().toFloat(&ok);
         if (ok) {
@@ -119,15 +123,6 @@
     }
 
     QDomElement pluginElt = doc.firstChildElement("plugin");
-
-    if (pluginElt.isNull()) {
-        std::cerr << "pluginElt is null" << std::endl;
-        pluginElt = doc.documentElement();
-        if (pluginElt.isNull()) {
-            std::cerr << "pluginElt is still null" << std::endl;
-        }
-    }
-
     QDomNamedNodeMap attrNodes = pluginElt.attributes();
     QXmlAttributes attrs;