template.cpp   template.cpp 
skipping to change at line 263 skipping to change at line 263
do do
{ {
match = regexp.match(*this,offset); match = regexp.match(*this,offset);
if(match.hasMatch()) if(match.hasMatch())
{ {
int start = match.capturedStart(0); int start = match.capturedStart(0);
int len = match.capturedLength(0); int len = match.capturedLength(0);
QString key = match.captured(1); QString key = match.captured(1);
//replace escaped quotes //replace escaped double and single quotes
key.replace("\\\"","\""); key.replace("\\\"","\"");
key.replace("\\'", "'");
QString translation = provider.getTranslation(key); QString translation = provider.getTranslation(key);
//find out if we have optional parameters //find out if we have optional parameters
if(match.capturedLength(2)>0) if(match.capturedLength(2)>0)
{ {
QString params = match.captured(2); QString params = match.captured(2);
//extract each optional parameter //extract each optional parameter
QRegularExpressionMatchIterator it = paramEx p.globalMatch(params); QRegularExpressionMatchIterator it = paramEx p.globalMatch(params);
while(it.hasNext()) while(it.hasNext())
{ {
QRegularExpressionMatch paramMatch = it.next(); QRegularExpressionMatch paramMatch = it.next();
QString param = paramMatch.captured( 1); QString param = paramMatch.captured( 1);
//replace escaped quotes //replace escaped quotes
param.replace("\\\"","\""); param.replace("\\\"","\"");
param.replace("\\'", "'");
//apply the param //apply the param
translation = translation.arg(param) ; translation = translation.arg(param) ;
} }
} }
this->replace(start,len,translation); this->replace(start,len,translation);
offset = start+translation.length(); offset = start+translation.length();
} }
}while(match.hasMatch()); }while(match.hasMatch());
 End of changes. 3 change blocks. 
1 lines changed or deleted 3 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/