18#include <QRegularExpression> 
   23  slst.reserve( lst.size() * 2 );
 
   26    slst << ref.layerId();
 
   27    slst << ref.symbolLayerIdV2();
 
   29  return slst.join( 
';' );
 
   38  if ( 
str.contains( 
',' ) )
 
   49    const thread_local QRegularExpression partsRx( QStringLiteral( 
"((?:.*?),(?:.*?),(?:(?:\\d+,)+)?(?:\\d+);)" ) );
 
   50    QRegularExpressionMatchIterator partsIt = partsRx.globalMatch( 
str + 
';' );
 
   52    while ( partsIt.hasNext() )
 
   54      const QRegularExpressionMatch partMatch = partsIt.next();
 
   55      const QString tuple = partMatch.captured( 1 );
 
   60      const thread_local QRegularExpression rx( QStringLiteral( 
"(.*?),(.*?),((?:\\d+,)+)?(\\d+)" ) );
 
   62      const QRegularExpressionMatch match = rx.match( tuple );
 
   63      if ( !match.hasMatch() )
 
   66      const QString layerId = match.captured( 1 );
 
   67      const QString symbolKey = match.captured( 2 );
 
   68      const QStringList indices = QString( match.captured( 3 ) + match.captured( 4 ) ).split( 
',' );
 
   70      QVector<int> indexPath;
 
   71      indexPath.reserve( indices.size() );
 
   72      for ( 
const QString &index : indices )
 
   74        indexPath.append( index.toInt() );
 
   82    const QStringList elems = 
str.split( 
';' );
 
   83    for ( 
int i = 0; i < elems.size(); )
 
We may need stable references to symbol layers, when pointers to symbol layers is not usable (when a ...
 
Type used to refer to a specific symbol layer in a symbol of a layer.
 
#define Q_NOWARN_DEPRECATED_POP
 
#define Q_NOWARN_DEPRECATED_PUSH
 
QString symbolLayerReferenceListToString(const QgsSymbolLayerReferenceList &lst)
Utilitary function to turn a QgsSymbolLayerReferenceList into a string.
 
QgsSymbolLayerReferenceList stringToSymbolLayerReferenceList(const QString &str)
Utilitary function to parse a string originated from symbolLayerReferenceListToString into a QgsSymbo...
 
QList< QgsSymbolLayerReference > QgsSymbolLayerReferenceList