Skip to content
Permalink
Browse files
Regex as cons thread_local
  • Loading branch information
domi4484 committed Aug 17, 2021
1 parent 75a4f28 commit d94bcbc20d978b87100cb78d81fdc85ad3fb44f4
Showing with 7 additions and 7 deletions.
  1. +7 −7 src/core/providers/memory/qgsmemoryprovider.cpp
@@ -113,13 +113,13 @@ QgsMemoryProvider::QgsMemoryProvider( const QString &uri, const ProviderOptions
if ( query.hasQueryItem( QStringLiteral( "field" ) ) )
{
QList<QgsField> attributes;
QRegularExpression reFieldDef( "\\:"
"([\\w\\s]+)" // type
"(?:\\((\\-?\\d+)" // length
"(?:\\,(\\-?\\d+))?" // precision
"\\))?(\\[\\])?" // array
"$",
QRegularExpression::CaseInsensitiveOption );
const thread_local QRegularExpression reFieldDef( "\\:"
"([\\w\\s]+)" // type
"(?:\\((\\-?\\d+)" // length
"(?:\\,(\\-?\\d+))?" // precision
"\\))?(\\[\\])?" // array
"$",
QRegularExpression::CaseInsensitiveOption );
QStringList fields = query.allQueryItemValues( QStringLiteral( "field" ) );
for ( int i = 0; i < fields.size(); i++ )
{

0 comments on commit d94bcbc

Please sign in to comment.