48 const thread_local QRegularExpression sRx( QStringLiteral(
"^data:(.*/.*?);?(?:base64)?,(.*)$" ) );
49 const QRegularExpressionMatch base64Match = sRx.match( path );
50 if ( !base64Match.hasMatch() )
54 *mimeType = base64Match.captured( 1 );
56 *data = base64Match.captured( 2 );
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.
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.