Skip to content

Commit

Permalink
Further
Browse files Browse the repository at this point in the history
  • Loading branch information
m-kuhn authored and github-actions[bot] committed May 11, 2021
1 parent e32b1fc commit 7339072
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
8 changes: 5 additions & 3 deletions src/core/expression/qgsexpressionnodeimpl.cpp
Expand Up @@ -558,9 +558,11 @@ QVariant QgsExpressionNodeBinaryOperator::evalNode( QgsExpression *parent, const
esc_regexp.replace( pos + 1, 1, '.' );
pos += 1;
}
const thread_local QRegularExpression rx4( QStringLiteral( "\\\\_" ) );
esc_regexp.replace( rx4, QStringLiteral( "_" ) );
matches = QRegExp( esc_regexp, mOp == boLike || mOp == boNotLike ? Qt::CaseSensitive : Qt::CaseInsensitive ).exactMatch( str );
esc_regexp.replace( QStringLiteral( "\\\\_" ), QStringLiteral( "_" ) );
QRegularExpression::PatternOption option;
if ( mOp == boILike || mOp == boNotILike )
option = QRegularExpression::CaseInsensitiveOption;
matches = QRegularExpression( esc_regexp, option ).match( str ).hasMatch();
}
else
{
Expand Down
2 changes: 1 addition & 1 deletion src/core/qgsapplication.cpp
Expand Up @@ -874,7 +874,7 @@ void QgsApplication::setUITheme( const QString &themeName )
{
// apply OS-specific UI scale factor to stylesheet's em values
int index = 0;
const thread_local QRegularExpression regex( QStringLiteral( "(?<=[\\s:])([0-9\\.]+)(?=em)" ) );
const static QRegularExpression regex( QStringLiteral( "(?<=[\\s:])([0-9\\.]+)(?=em)" ) );
QRegularExpressionMatch match = regex.match( styledata, index );
while ( match.hasMatch() )
{
Expand Down

0 comments on commit 7339072

Please sign in to comment.