Skip to content

Commit f6adcad

Browse files
committed
qt: Use QRegularExpression instead of QRegExp
1 parent 5f01cb2 commit f6adcad

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/qt/utilitydialog.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
#include <QCloseEvent>
2323
#include <QLabel>
2424
#include <QMainWindow>
25-
#include <QRegExp>
25+
#include <QRegularExpression>
2626
#include <QTextCursor>
2727
#include <QTextTable>
2828
#include <QVBoxLayout>
@@ -44,9 +44,7 @@ HelpMessageDialog::HelpMessageDialog(QWidget *parent, bool about) :
4444
/// HTML-format the license message from the core
4545
QString licenseInfoHTML = QString::fromStdString(LicenseInfo());
4646
// Make URLs clickable
47-
QRegExp uri("<(.*)>", Qt::CaseSensitive, QRegExp::RegExp2);
48-
uri.setMinimal(true); // use non-greedy matching
49-
licenseInfoHTML.replace(uri, "<a href=\"\\1\">\\1</a>");
47+
licenseInfoHTML.replace(QRegularExpression("<(.*)>"), "<a href=\"\\1\">\\1</a>");
5048
// Replace newlines with HTML breaks
5149
licenseInfoHTML.replace("\n", "<br>");
5250

0 commit comments

Comments
 (0)