forked from qt-creator/qt-creator
VCS: Small cleanup in UrlTextCursorHandler::findContentsUnderCursor()
Change-Id: Iec20500d86bf4e585d037e9b4028ccb28194124c Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
committed by
André Hartmann
parent
80fdc9eb93
commit
48748bd62f
@@ -409,12 +409,12 @@ bool UrlTextCursorHandler::findContentsUnderCursor(const QTextCursor &cursor)
|
|||||||
QRegularExpression &pattern;
|
QRegularExpression &pattern;
|
||||||
int matchNumber;
|
int matchNumber;
|
||||||
QString urlPrefix;
|
QString urlPrefix;
|
||||||
} RegexUrls[] = {
|
} const regexUrls[] = {
|
||||||
{m_pattern, 0, ""},
|
{m_pattern, 0, ""},
|
||||||
{m_jiraPattern, 2, "https://bugreports.qt.io/browse/"},
|
{m_jiraPattern, 2, "https://bugreports.qt.io/browse/"},
|
||||||
{m_gerritPattern, 1, "https://codereview.qt-project.org/r/"},
|
{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);
|
QRegularExpressionMatchIterator i = r.pattern.globalMatch(line);
|
||||||
while (i.hasNext()) {
|
while (i.hasNext()) {
|
||||||
const QRegularExpressionMatch match = i.next();
|
const QRegularExpressionMatch match = i.next();
|
||||||
|
Reference in New Issue
Block a user