Commit bd259129 authored by Christian Stenger's avatar Christian Stenger

Tests: Fix compile

Broke with 4e96f2ce.

Change-Id: I7c467cc92cc8444bd3b1ef41eebff089668a0f31
Reviewed-by: Tobias Hunger's avatarTobias Hunger <tobias.hunger@qt.io>
parent 1e68d91c
......@@ -34,8 +34,14 @@ using namespace Utils;
class MacroMapExpander : public AbstractMacroExpander {
public:
virtual bool resolveMacro(const QString &name, QString *ret)
virtual bool resolveMacro(const QString &name, QString *ret, QSet<AbstractMacroExpander*> &seen)
{
// loop prevention
const int count = seen.count();
seen.insert(this);
if (seen.count() == count)
return false;
QHash<QString, QString>::const_iterator it = m_map.constFind(name);
if (it != m_map.constEnd()) {
*ret = it.value();
......
......@@ -32,8 +32,14 @@
class TestMacroExpander : public Utils::AbstractMacroExpander
{
public:
virtual bool resolveMacro(const QString &name, QString *ret)
virtual bool resolveMacro(const QString &name, QString *ret, QSet<AbstractMacroExpander*> &seen)
{
// loop prevention
const int count = seen.count();
seen.insert(this);
if (seen.count() == count)
return false;
if (name == QLatin1String("foo")) {
*ret = QLatin1String("a");
return true;
......
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