53  const thread_local QRegularExpression sRx( QStringLiteral( 
"^data:([a-zA-Z0-9+\\-]*\\/[a-zA-Z0-9+\\-]*?)(?:;(base64|utf8))?,(.*)$" ) );
 
   54  const QRegularExpressionMatch base64Match = sRx.match( path );
 
   55  if ( !base64Match.hasMatch() )
 
   58  const QString typeMatch = base64Match.captured( 2 );
 
   59  const QString mimeMatch = base64Match.captured( 1 );
 
   62    *mimeType = mimeMatch;
 
   64    *data = base64Match.captured( 3 );
 
   66  if ( typeMatch == QLatin1String( 
"base64" ) )
 
   68  else if ( typeMatch == QLatin1String( 
"utf8" ) )
 
   73  if ( mimeMatch.endsWith( QLatin1String( 
"xml" ) ) || mimeMatch.endsWith( QLatin1String( 
"svg" ) ) )
 
 
   81  const thread_local QRegularExpression sRx( QStringLiteral( 
"^data:([a-zA-Z0-9+\\-]*\\/[a-zA-Z0-9+\\-]*?)\\;utf8,(.*)$" ), QRegularExpression::DotMatchesEverythingOption );
 
   82  const QRegularExpressionMatch stringMatch = sRx.match( path );
 
   84  if ( !stringMatch.hasMatch() )
 
   88    *mimeType = stringMatch.captured( 1 );
 
   90    *data = stringMatch.captured( 2 );
 
 
static bool parseEmbeddedStringData(const QString &path, QString *mimeType=nullptr, QString *data=nullptr)
Parses a path to determine if it represents a embedded string data, and if so, extracts the component...
 
virtual void onRemoteContentFetched(const QString &url, bool success)
Triggered after remote content (i.e.
 
static bool parseBase64DataUrl(const QString &path, QString *mimeType=nullptr, QString *data=nullptr)
Parses a path to determine if it represents a base 64 encoded HTML data URL, and if so,...
 
QgsAbstractContentCacheBase(QObject *parent)
Constructor for QgsAbstractContentCacheBase, with the specified parent object.
 
virtual bool invalidateCacheEntry(const QString &path)
Invalidates a cache entry for the specified path.
 
static bool isBase64Data(const QString &path)
Returns true if path represents base64 encoded data.
 
QgsAbstractContentCacheEntry(const QString &path)
Constructor for QgsAbstractContentCacheEntry for an entry relating to the specified path.