From 6e13e426db84b9137b98ba80552b91e3684085cd Mon Sep 17 00:00:00 2001 From: Torgny Nyblom Date: Tue, 30 Nov 2010 10:37:55 +0100 Subject: Allow more then one variable to be used on a line. --- src/ruleparser.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/ruleparser.cpp b/src/ruleparser.cpp index 6f98fbf..27ab0ca 100644 --- a/src/ruleparser.cpp +++ b/src/ruleparser.cpp @@ -129,8 +129,7 @@ void Rules::load(const QString &filename) QString includeFile = filename.left( index + 1) + includeLine.cap(1); load(includeFile); } else { - int index = variableLine.indexIn(line); - if ( index != -1 ) { + while( variableLine.indexIn(line) != -1 ) { if (!m_variables.contains(variableLine.cap(1))) qFatal("Undeclared variable: %s", qPrintable(variableLine.cap(1))); line = line.replace(variableLine, m_variables[variableLine.cap(1)]); -- cgit v1.2.1