Skip to content

Commit 77c4edf

Browse files
committed
Replace use of deprecated Qt::escape
1 parent 84774ee commit 77c4edf

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/core/qgsstringutils.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
#include "qgsstringutils.h"
1717
#include <QVector>
1818
#include <QRegExp>
19-
#include <QTextDocument> // for Qt::escape
2019
#include <QStringList>
2120
#include <QTextBoundaryFinder>
2221

@@ -362,7 +361,7 @@ QString QgsStringUtils::insertLinks( const QString &string, bool *foundLinks )
362361
{
363362
protoUrl.prepend( "http://" );
364363
}
365-
QString anchor = QStringLiteral( "<a href=\"%1\">%2</a>" ).arg( Qt::escape( protoUrl ), Qt::escape( url ) );
364+
QString anchor = QStringLiteral( "<a href=\"%1\">%2</a>" ).arg( protoUrl.toHtmlEscaped(), url.toHtmlEscaped() );
366365
converted.replace( urlRegEx.pos( 1 ), url.length(), anchor );
367366
offset = urlRegEx.pos( 1 ) + anchor.length();
368367
}
@@ -371,7 +370,7 @@ QString QgsStringUtils::insertLinks( const QString &string, bool *foundLinks )
371370
{
372371
found = true;
373372
QString email = emailRegEx.cap( 1 );
374-
QString anchor = QStringLiteral( "<a href=\"mailto:%1\">%1</a>" ).arg( Qt::escape( email ), Qt::escape( email ) );
373+
QString anchor = QStringLiteral( "<a href=\"mailto:%1\">%1</a>" ).arg( email.toHtmlEscaped(), email.toHtmlEscaped() );
375374
converted.replace( emailRegEx.pos( 1 ), email.length(), anchor );
376375
offset = emailRegEx.pos( 1 ) + anchor.length();
377376
}

0 commit comments

Comments
 (0)