chore: make all the regexes static const
Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
This commit is contained in:
parent
21c90527d2
commit
c5fd5e6ac1
37 changed files with 87 additions and 84 deletions
|
@ -98,8 +98,8 @@ Task::State MetaCacheSink::finalizeCache(QNetworkReply& reply)
|
|||
auto cache_control_header = reply.rawHeader("Cache-Control");
|
||||
qCDebug(taskMetaCacheLogC) << "Parsing 'Cache-Control' header with" << cache_control_header;
|
||||
|
||||
QRegularExpression max_age_expr("max-age=([0-9]+)");
|
||||
qint64 max_age = max_age_expr.match(cache_control_header).captured(1).toLongLong();
|
||||
static const QRegularExpression s_maxAgeExpr("max-age=([0-9]+)");
|
||||
qint64 max_age = s_maxAgeExpr.match(cache_control_header).captured(1).toLongLong();
|
||||
m_entry->setMaximumAge(max_age);
|
||||
|
||||
} else if (reply.hasRawHeader("Expires")) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue