forked from qt-creator/qt-creator
QbsPM:QmakePM: Replace QRegExp by QRegularExpression
Task-number: QTCREATORBUG-24098 Change-Id: If561553a6030f8eaedbafbc1b4531a6b63c4aa36 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
@@ -33,7 +33,7 @@
|
||||
#include <QStandardItem>
|
||||
|
||||
#include <QDebug>
|
||||
#include <QRegExp>
|
||||
#include <QRegularExpression>
|
||||
|
||||
namespace QmakeProjectManager {
|
||||
namespace Internal {
|
||||
@@ -53,7 +53,7 @@ public:
|
||||
private:
|
||||
void appendClass(const QString &);
|
||||
|
||||
QRegExp m_validator;
|
||||
QRegularExpression m_validator;
|
||||
const QString m_newClassPlaceHolder;
|
||||
};
|
||||
|
||||
@@ -75,7 +75,7 @@ void ClassModel::appendClass(const QString &c)
|
||||
|
||||
bool ClassModel::setData(const QModelIndex &index, const QVariant &value, int role)
|
||||
{
|
||||
if (role == Qt::EditRole && !m_validator.exactMatch(value.toString()))
|
||||
if (role == Qt::EditRole && !m_validator.match(value.toString()).hasMatch())
|
||||
return false;
|
||||
return QStandardItemModel::setData(index, value, role);
|
||||
}
|
||||
|
||||
@@ -36,12 +36,12 @@
|
||||
|
||||
#include <QFileInfo>
|
||||
#include <QDir>
|
||||
#include <QRegExp>
|
||||
#include <QRegularExpression>
|
||||
#include <QSet>
|
||||
|
||||
static QString headerGuard(const QString &header)
|
||||
{
|
||||
return header.toUpper().replace(QRegExp(QLatin1String("[^A-Z0-9]+")), QLatin1String("_"));
|
||||
return header.toUpper().replace(QRegularExpression("[^A-Z0-9]+"), QString("_"));
|
||||
}
|
||||
|
||||
namespace QmakeProjectManager {
|
||||
|
||||
Reference in New Issue
Block a user