Commit 8d84f8d7 authored by Aleix Pol Gonzalez's avatar Aleix Pol Gonzalez 🐧
Browse files

Improve debugging of Variables instances

parent fadddb2e
......@@ -90,3 +90,14 @@ Expression Variables::valueExpression(const QString& name) const
{
return Expression(value(name)->copy());
}
QString Variables::toString() const
{
QString dbg;
dbg += QStringLiteral("Variables(");
for (Variables::const_iterator it = constBegin(), itEnd = constEnd(); it != itEnd; ++it)
dbg += it.key() + QLatin1Char('=') + it.value()->toString() + QLatin1String(", ");
dbg += QLatin1String(")");
return dbg;
}
......@@ -87,7 +87,9 @@ class ANALITZA_EXPORT Variables : public QHash<QString, Object*>
/** @returns the expression contained by the @p name identifier. */
Expression valueExpression(const QString& name) const;
QString toString() const;
};
}
#endif
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment