Skip to content
This repository was archived by the owner on Sep 27, 2024. It is now read-only.

Commit 6643a87

Browse files
committed
Qt::escape(string) is deprecated in Qt5. Replace with string.toHtmlEscaped()
1 parent b3f41b4 commit 6643a87

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/APIHelpers.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ QString oscapItemGetReadableTitle(struct xccdf_item* item, struct xccdf_policy*
4444
oscap_text_iterator_free(title_it);
4545
if (!unresolved)
4646
return "";
47-
char* resolved = xccdf_policy_substitute(Qt::escape(QString::fromUtf8(unresolved)).toUtf8().constData(), policy);
47+
char* resolved = xccdf_policy_substitute(QString::fromUtf8(unresolved).toHtmlEscaped().toUtf8().constData(), policy);
4848
free(unresolved);
4949
const QString ret = QString::fromUtf8(resolved);
5050
free(resolved);

src/DiagnosticsDialog.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ void DiagnosticsDialog::pushMessage(MessageSeverity severity, const QString& ful
142142
QString outputMessage = fullMessage;
143143
if (format & MF_XML)
144144
{
145-
outputMessage = Qt::escape(outputMessage);
145+
outputMessage = outputMessage.toHtmlEscaped();
146146
}
147147

148148
if (format & MF_PREFORMATTED)

0 commit comments

Comments
 (0)