mirror of
https://github.com/fralx/LimeReport.git
synced 2025-11-25 08:28:06 +03:00
QRegularExpression usage has been fixed
Qt6 drag&drop has been fixed
This commit is contained in:
@@ -398,7 +398,7 @@ QString ScriptEngineManager::expandUserVariables(QString context, RenderPass /*
|
||||
}
|
||||
return context;
|
||||
#else
|
||||
QRegularExpression rx(Const::VARIABLE_RX);
|
||||
QRegularExpression rx = getVariableRegEx();
|
||||
if (context.contains(rx)){
|
||||
int pos = 0;
|
||||
QRegularExpressionMatch match = rx.match(context, pos);
|
||||
@@ -504,8 +504,7 @@ QString ScriptEngineManager::expandDataFields(QString context, ExpandType expand
|
||||
|
||||
return context;
|
||||
#else
|
||||
QRegularExpression rx(Const::FIELD_RX);
|
||||
|
||||
QRegularExpression rx = getFieldRegEx();
|
||||
if (context.contains(rx)){
|
||||
QRegularExpressionMatch match = rx.match(context);
|
||||
while (match.hasMatch()){
|
||||
@@ -567,8 +566,7 @@ QString ScriptEngineManager::expandScripts(QString context, QVariant& varValue,
|
||||
|
||||
if (context.contains(rx)){
|
||||
#else
|
||||
QRegularExpression rx(Const::SCRIPT_RX, QRegularExpression::DotMatchesEverythingOption);
|
||||
|
||||
QRegularExpression rx = getScriptRegEx();
|
||||
if(context.contains(rx)){
|
||||
#endif
|
||||
|
||||
@@ -636,8 +634,8 @@ QVariant ScriptEngineManager::evaluateScript(const QString& script){
|
||||
QVariant varValue;
|
||||
|
||||
if (script.contains(rx)){
|
||||
#else
|
||||
QRegularExpression rx(Const::SCRIPT_RX);
|
||||
#else
|
||||
QRegularExpression rx = getScriptRegEx();
|
||||
QVariant varValue;
|
||||
|
||||
if (script.contains(rx)){
|
||||
@@ -1110,7 +1108,7 @@ bool ScriptExtractor::parse()
|
||||
|
||||
bool ScriptExtractor::parse(int &curPos, const State& state, ScriptNode::Ptr scriptNode)
|
||||
{
|
||||
while (curPos<m_context.length()){
|
||||
while (curPos < m_context.length()){
|
||||
switch (state) {
|
||||
case OpenBracketFound:
|
||||
if (m_context[curPos]=='}'){
|
||||
@@ -1680,11 +1678,10 @@ QVariant ScriptFunctionsManager::calcGroupFunction(const QString &name, const QS
|
||||
if (gf){
|
||||
if (gf->isValid()){
|
||||
return gf->calculate(pageItem);
|
||||
}else{
|
||||
} else{
|
||||
return gf->error();
|
||||
}
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
return QString(QObject::tr("Function %1 not found or have wrong arguments").arg(name));
|
||||
}
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user