From c5be1a98ba4c82495ef5b542833657b9ae8bb164 Mon Sep 17 00:00:00 2001 From: Simon De Backer Date: Fri, 18 Sep 2020 23:01:51 +0200 Subject: [PATCH] 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 --- sources/autoNum/numerotationcontext.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/sources/autoNum/numerotationcontext.cpp b/sources/autoNum/numerotationcontext.cpp index 1f932e9fa..a94fe7ec9 100644 --- a/sources/autoNum/numerotationcontext.cpp +++ b/sources/autoNum/numerotationcontext.cpp @@ -16,9 +16,10 @@ along with QElectroTech. If not, see . */ #include "numerotationcontext.h" +#include "qet.h" #include -#include "qet.h" +#include /** Constructor @@ -141,7 +142,7 @@ QString NumerotationContext::validRegExpNumber() const */ bool NumerotationContext::keyIsAcceptable(const QString &type) const { - return (type.contains(QRegExp(validRegExpNum()))); + return (type.contains(QRegularExpression(validRegExpNum()))); } /** @@ -150,7 +151,7 @@ bool NumerotationContext::keyIsAcceptable(const QString &type) const */ bool NumerotationContext::keyIsNumber(const QString &type) const { - return (type.contains(QRegExp(validRegExpNumber()))); + return (type.contains(QRegularExpression(validRegExpNumber()))); } /**