}\r
\r
BlockParameterGeneric::BlockParameterGeneric(AbstractBlock* _owner, const QString &_name, const QString &_type, const QString &_value) : BlockParameter(_owner, _name, _type, _value) {\r
+ /* CAUTION: no check done on the type parameter !\r
+ * It must never be "expression" but something that is numeric/boolean\r
+ */\r
userValue = defaultValue;\r
}\r
\r
}\r
\r
if (!userValue.isNull()) {\r
- ret = formatValue.arg(name).arg(type).arg(userValue.toString());\r
+ ret = formatValue.arg(name).arg(getTypeString()).arg(userValue.toString());\r
}\r
else if (!defaultValue.isNull()) {\r
- ret = formatValue.arg(name).arg(type).arg(defaultValue.toString());\r
+ ret = formatValue.arg(name).arg(getTypeString()).arg(defaultValue.toString());\r
}\r
else {\r
- ret = formatNoValue.arg(name).arg(type);\r
+ ret = formatNoValue.arg(name).arg(getTypeString());\r
}\r
}\r
- else if (context == BlockParameter::Architecture) {\r
+ else if (context == BlockParameter::Instance) {\r
QString format = "%1 => %2";\r
if ((flags & BlockParameter::NoComma) == 0) {\r
format.append(";");\r
}\r
AbstractBlock* parent = owner->getParent();\r
- BlockParameter* p = parent->getParameterFromName(name);\r
+ BlockParameter* p = NULL;\r
+ if (parent != NULL) {\r
+ p = parent->getParameterFromName(name);\r
+ }\r
if (p != NULL) {\r
/* the parent group has a generic parameter with the same\r
name\r