Skip to content
Permalink
Browse files

Further

  • Loading branch information
m-kuhn committed Dec 23, 2020
1 parent 67c24fa commit b666eddfe42549c92377d8318e0bf0a4473028a0
Showing with 6 additions and 4 deletions.
  1. +5 −3 src/core/expression/qgsexpressionnodeimpl.cpp
  2. +1 −1 src/core/qgsapplication.cpp
@@ -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
{
@@ -878,7 +878,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() )
{

0 comments on commit b666edd

Please sign in to comment.
You can’t perform that action at this time.