VCS: Small cleanup in UrlTextCursorHandler::findContentsUnderCursor()

Change-Id: Iec20500d86bf4e585d037e9b4028ccb28194124c
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
Andre Hartmann
2024-08-06 13:27:50 +02:00
committed by André Hartmann
parent 80fdc9eb93
commit 48748bd62f

View File

@@ -409,12 +409,12 @@ bool UrlTextCursorHandler::findContentsUnderCursor(const QTextCursor &cursor)
QRegularExpression &pattern;
int matchNumber;
QString urlPrefix;
} RegexUrls[] = {
} const regexUrls[] = {
{m_pattern, 0, ""},
{m_jiraPattern, 2, "https://bugreports.qt.io/browse/"},
{m_gerritPattern, 1, "https://codereview.qt-project.org/r/"},
};
for (const auto &r : RegexUrls) {
for (const auto &r : regexUrls) {
QRegularExpressionMatchIterator i = r.pattern.globalMatch(line);
while (i.hasNext()) {
const QRegularExpressionMatch match = i.next();