Commit 218e7ec6 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Minor optimization

parent 6fdb77fa
......@@ -100,7 +100,7 @@ void ScamDetectionWebEngine::handleScanPage(const QVariant &result)
Q_EMIT resultScanDetection(foundScam);
return;
}
QRegularExpression ip4regExp(QStringLiteral(
static const QRegularExpression ip4regExp(QStringLiteral(
"\\b[0-9]{1,3}\\.[0-9]{1,3}(?:\\.[0-9]{0,3})?(?:\\.[0-9]{0,3})?"));
const QVariantMap mapResult = resultList.at(0).toMap();
const QList<QVariant> lst = mapResult.value(QStringLiteral("anchors")).toList();
......
......@@ -786,7 +786,7 @@ QString NodeHelper::extractAttachmentIndex(const QString &path) const
// start of the index is something that is not a number followed by a dot: \D.
// index is only made of numbers,"." and ":": ([0-9.:]+)
// index is the last part of the folder name: /
const QRegularExpression re(QStringLiteral("\\D\\.([e0-9.:]+)/"));
static const QRegularExpression re(QStringLiteral("\\D\\.([e0-9.:]+)/"));
QRegularExpressionMatch rmatch;
path.lastIndexOf(re, -1, &rmatch);
if (rmatch.hasMatch()) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment