mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-18 05:00:33 +01:00
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:
@@ -16,9 +16,10 @@
|
|||||||
along with QElectroTech. If not, see <http://www.gnu.org/licenses/>.
|
along with QElectroTech. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
#include "numerotationcontext.h"
|
#include "numerotationcontext.h"
|
||||||
|
#include "qet.h"
|
||||||
|
|
||||||
#include <utility>
|
#include <utility>
|
||||||
#include "qet.h"
|
#include <QRegularExpression>
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Constructor
|
Constructor
|
||||||
@@ -141,7 +142,7 @@ QString NumerotationContext::validRegExpNumber() const
|
|||||||
*/
|
*/
|
||||||
bool NumerotationContext::keyIsAcceptable(const QString &type) 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
|
bool NumerotationContext::keyIsNumber(const QString &type) const
|
||||||
{
|
{
|
||||||
return (type.contains(QRegExp(validRegExpNumber())));
|
return (type.contains(QRegularExpression(validRegExpNumber())));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user