Fix deprecated QRegExp

Use QRegularExpression instead.

https://doc.qt.io/qt-5/qregularexpression.html#notes-for-qregexp-users

This function was introduced in Qt 5
This commit is contained in:
Simon De Backer
2020-09-18 23:04:52 +02:00
parent 0b3238aac0
commit 7fb4033ece

View File

@@ -299,7 +299,9 @@ void DiagramPrintDialog::updatePrintTypeDialog()
{ {
if (pdf_choice_ -> isChecked() && filepath.endsWith(".ps")) if (pdf_choice_ -> isChecked() && filepath.endsWith(".ps"))
{ {
QRegExp re("\\.ps$", Qt::CaseInsensitive); QRegularExpression re
("\\.ps$",
QRegularExpression::CaseInsensitiveOption);
filepath.replace(re, ".pdf"); filepath.replace(re, ".pdf");
filepath_field_ -> setText(filepath); filepath_field_ -> setText(filepath);
} }