Skip to content
Permalink
Browse files

Replace use of deprecated Qt::escape

  • Loading branch information
nyalldawson committed Sep 5, 2017
1 parent 84774ee commit 77c4edfbff422aaefd3deb95d329b7c6e7d889dd
Showing with 2 additions and 3 deletions.
  1. +2 −3 src/core/qgsstringutils.cpp
@@ -16,7 +16,6 @@
#include "qgsstringutils.h"
#include <QVector>
#include <QRegExp>
#include <QTextDocument> // for Qt::escape
#include <QStringList>
#include <QTextBoundaryFinder>

@@ -362,7 +361,7 @@ QString QgsStringUtils::insertLinks( const QString &string, bool *foundLinks )
{
protoUrl.prepend( "http://" );
}
QString anchor = QStringLiteral( "<a href=\"%1\">%2</a>" ).arg( Qt::escape( protoUrl ), Qt::escape( url ) );
QString anchor = QStringLiteral( "<a href=\"%1\">%2</a>" ).arg( protoUrl.toHtmlEscaped(), url.toHtmlEscaped() );
converted.replace( urlRegEx.pos( 1 ), url.length(), anchor );
offset = urlRegEx.pos( 1 ) + anchor.length();
}
@@ -371,7 +370,7 @@ QString QgsStringUtils::insertLinks( const QString &string, bool *foundLinks )
{
found = true;
QString email = emailRegEx.cap( 1 );
QString anchor = QStringLiteral( "<a href=\"mailto:%1\">%1</a>" ).arg( Qt::escape( email ), Qt::escape( email ) );
QString anchor = QStringLiteral( "<a href=\"mailto:%1\">%1</a>" ).arg( email.toHtmlEscaped(), email.toHtmlEscaped() );
converted.replace( emailRegEx.pos( 1 ), email.length(), anchor );
offset = emailRegEx.pos( 1 ) + anchor.length();
}

0 comments on commit 77c4edf

Please sign in to comment.
You can’t perform that action at this time.