diff options
Diffstat (limited to 'src/datavisualization/data')
15 files changed, 149 insertions, 149 deletions
diff --git a/src/datavisualization/data/baritemmodelhandler.cpp b/src/datavisualization/data/baritemmodelhandler.cpp index 5a2d92cd..c09e97c9 100644 --- a/src/datavisualization/data/baritemmodelhandler.cpp +++ b/src/datavisualization/data/baritemmodelhandler.cpp @@ -108,18 +108,18 @@ void BarItemModelHandler::resolveModel() // Value and rotation patterns can be reused on single item changes, // so store them to member variables. - QRegExp rowPattern(m_proxy->rowRolePattern()); - QRegExp colPattern(m_proxy->columnRolePattern()); + QRegularExpression rowPattern(m_proxy->rowRolePattern()); + QRegularExpression colPattern(m_proxy->columnRolePattern()); m_valuePattern = m_proxy->valueRolePattern(); m_rotationPattern = m_proxy->rotationRolePattern(); QString rowReplace = m_proxy->rowRoleReplace(); QString colReplace = m_proxy->columnRoleReplace(); m_valueReplace = m_proxy->valueRoleReplace(); m_rotationReplace = m_proxy->rotationRoleReplace(); - bool haveRowPattern = !rowPattern.isEmpty() && rowPattern.isValid(); - bool haveColPattern = !colPattern.isEmpty() && colPattern.isValid(); - m_haveValuePattern = !m_valuePattern.isEmpty() && m_valuePattern.isValid(); - m_haveRotationPattern = !m_rotationPattern.isEmpty() && m_rotationPattern.isValid(); + bool haveRowPattern = !rowPattern.namedCaptureGroups().isEmpty() && rowPattern.isValid(); + bool haveColPattern = !colPattern.namedCaptureGroups().isEmpty() && colPattern.isValid(); + m_haveValuePattern = !m_valuePattern.namedCaptureGroups().isEmpty() && m_valuePattern.isValid(); + m_haveRotationPattern = !m_rotationPattern.namedCaptureGroups().isEmpty() && m_rotationPattern.isValid(); QStringList rowLabels; QStringList columnLabels; diff --git a/src/datavisualization/data/baritemmodelhandler_p.h b/src/datavisualization/data/baritemmodelhandler_p.h index 4b3acdd5..0363ad05 100644 --- a/src/datavisualization/data/baritemmodelhandler_p.h +++ b/src/datavisualization/data/baritemmodelhandler_p.h @@ -64,8 +64,8 @@ protected: int m_columnCount; int m_valueRole; int m_rotationRole; - QRegExp m_valuePattern; - QRegExp m_rotationPattern; + QRegularExpression m_valuePattern; + QRegularExpression m_rotationPattern; QString m_valueReplace; QString m_rotationReplace; bool m_haveValuePattern; diff --git a/src/datavisualization/data/qitemmodelbardataproxy.cpp b/src/datavisualization/data/qitemmodelbardataproxy.cpp index f87016e1..d901b07d 100644 --- a/src/datavisualization/data/qitemmodelbardataproxy.cpp +++ b/src/datavisualization/data/qitemmodelbardataproxy.cpp @@ -76,7 +76,7 @@ QT_BEGIN_NAMESPACE_DATAVISUALIZATION * If the fields of the model do not contain the data in the exact format you need, you can specify * a search pattern regular expression and a replace rule for each role to get the value in a * format you need. For more information how the replace using regular expressions works, see - * QString::replace(const QRegExp &rx, const QString &after) function documentation. Note that + * QString::replace(const QRegularExpression &rx, const QString &after) function documentation. Note that * using regular expressions has an impact on the performance, so it's more efficient to utilize * item models where doing search and replace is not necessary to get the desired values. * @@ -215,7 +215,7 @@ QT_BEGIN_NAMESPACE_DATAVISUALIZATION * \qmlproperty string ItemModelBarDataProxy::rowRoleReplace * This property defines the replace content to be used in conjunction with rowRolePattern. * Defaults to empty string. For more information on how the search and replace using regular - * expressions works, see QString::replace(const QRegExp &rx, const QString &after) + * expressions works, see QString::replace(const QRegularExpression &rx, const QString &after) * function documentation. * * \sa rowRole, rowRolePattern @@ -225,7 +225,7 @@ QT_BEGIN_NAMESPACE_DATAVISUALIZATION * \qmlproperty string ItemModelBarDataProxy::columnRoleReplace * This property defines the replace content to be used in conjunction with columnRolePattern. * Defaults to empty string. For more information on how the search and replace using regular - * expressions works, see QString::replace(const QRegExp &rx, const QString &after) + * expressions works, see QString::replace(const QRegularExpression &rx, const QString &after) * function documentation. * * \sa columnRole, columnRolePattern @@ -235,7 +235,7 @@ QT_BEGIN_NAMESPACE_DATAVISUALIZATION * \qmlproperty string ItemModelBarDataProxy::valueRoleReplace * This property defines the replace content to be used in conjunction with valueRolePattern. * Defaults to empty string. For more information on how the search and replace using regular - * expressions works, see QString::replace(const QRegExp &rx, const QString &after) + * expressions works, see QString::replace(const QRegularExpression &rx, const QString &after) * function documentation. * * \sa valueRole, valueRolePattern @@ -245,7 +245,7 @@ QT_BEGIN_NAMESPACE_DATAVISUALIZATION * \qmlproperty string ItemModelBarDataProxy::rotationRoleReplace * This property defines the replace content to be used in conjunction with rotationRolePattern. * Defaults to empty string. For more information on how the search and replace using regular - * expressions works, see QString::replace(const QRegExp &rx, const QString &after) + * expressions works, see QString::replace(const QRegularExpression &rx, const QString &after) * function documentation. * * \sa rotationRole, rotationRolePattern @@ -669,7 +669,7 @@ int QItemModelBarDataProxy::columnCategoryIndex(const QString &category) * * \sa rowRole, rowRoleReplace */ -void QItemModelBarDataProxy::setRowRolePattern(const QRegExp &pattern) +void QItemModelBarDataProxy::setRowRolePattern(const QRegularExpression &pattern) { if (dptr()->m_rowRolePattern != pattern) { dptr()->m_rowRolePattern = pattern; @@ -677,7 +677,7 @@ void QItemModelBarDataProxy::setRowRolePattern(const QRegExp &pattern) } } -QRegExp QItemModelBarDataProxy::rowRolePattern() const +QRegularExpression QItemModelBarDataProxy::rowRolePattern() const { return dptrc()->m_rowRolePattern; } @@ -695,7 +695,7 @@ QRegExp QItemModelBarDataProxy::rowRolePattern() const * * \sa columnRole, columnRoleReplace */ -void QItemModelBarDataProxy::setColumnRolePattern(const QRegExp &pattern) +void QItemModelBarDataProxy::setColumnRolePattern(const QRegularExpression &pattern) { if (dptr()->m_columnRolePattern != pattern) { dptr()->m_columnRolePattern = pattern; @@ -703,7 +703,7 @@ void QItemModelBarDataProxy::setColumnRolePattern(const QRegExp &pattern) } } -QRegExp QItemModelBarDataProxy::columnRolePattern() const +QRegularExpression QItemModelBarDataProxy::columnRolePattern() const { return dptrc()->m_columnRolePattern; } @@ -719,7 +719,7 @@ QRegExp QItemModelBarDataProxy::columnRolePattern() const * * \sa valueRole, valueRoleReplace */ -void QItemModelBarDataProxy::setValueRolePattern(const QRegExp &pattern) +void QItemModelBarDataProxy::setValueRolePattern(const QRegularExpression &pattern) { if (dptr()->m_valueRolePattern != pattern) { dptr()->m_valueRolePattern = pattern; @@ -727,7 +727,7 @@ void QItemModelBarDataProxy::setValueRolePattern(const QRegExp &pattern) } } -QRegExp QItemModelBarDataProxy::valueRolePattern() const +QRegularExpression QItemModelBarDataProxy::valueRolePattern() const { return dptrc()->m_valueRolePattern; } @@ -743,7 +743,7 @@ QRegExp QItemModelBarDataProxy::valueRolePattern() const * * \sa rotationRole, rotationRoleReplace */ -void QItemModelBarDataProxy::setRotationRolePattern(const QRegExp &pattern) +void QItemModelBarDataProxy::setRotationRolePattern(const QRegularExpression &pattern) { if (dptr()->m_rotationRolePattern != pattern) { dptr()->m_rotationRolePattern = pattern; @@ -751,7 +751,7 @@ void QItemModelBarDataProxy::setRotationRolePattern(const QRegExp &pattern) } } -QRegExp QItemModelBarDataProxy::rotationRolePattern() const +QRegularExpression QItemModelBarDataProxy::rotationRolePattern() const { return dptrc()->m_rotationRolePattern; } @@ -762,7 +762,7 @@ QRegExp QItemModelBarDataProxy::rotationRolePattern() const * \brief The replace content to be used in conjunction with rowRolePattern. * * Defaults to empty string. For more information on how the search and replace using regular - * expressions works, see QString::replace(const QRegExp &rx, const QString &after) + * expressions works, see QString::replace(const QRegularExpression &rx, const QString &after) * function documentation. * * \sa rowRole, rowRolePattern @@ -786,7 +786,7 @@ QString QItemModelBarDataProxy::rowRoleReplace() const * \brief The replace content to be used in conjunction with columnRolePattern. * * Defaults to empty string. For more information on how the search and replace using regular - * expressions works, see QString::replace(const QRegExp &rx, const QString &after) + * expressions works, see QString::replace(const QRegularExpression &rx, const QString &after) * function documentation. * * \sa columnRole, columnRolePattern @@ -810,7 +810,7 @@ QString QItemModelBarDataProxy::columnRoleReplace() const * \brief The replace content to be used in conjunction with valueRolePattern. * * Defaults to empty string. For more information on how the search and replace using regular - * expressions works, see QString::replace(const QRegExp &rx, const QString &after) + * expressions works, see QString::replace(const QRegularExpression &rx, const QString &after) * function documentation. * * \sa valueRole, valueRolePattern @@ -835,7 +835,7 @@ QString QItemModelBarDataProxy::valueRoleReplace() const * rotationRolePattern. * * Defaults to empty string. For more information on how the search and replace using regular - * expressions works, see QString::replace(const QRegExp &rx, const QString &after) + * expressions works, see QString::replace(const QRegularExpression &rx, const QString &after) * function documentation. * * \sa rotationRole, rotationRolePattern diff --git a/src/datavisualization/data/qitemmodelbardataproxy.h b/src/datavisualization/data/qitemmodelbardataproxy.h index 2dfa0753..7ac5d64a 100644 --- a/src/datavisualization/data/qitemmodelbardataproxy.h +++ b/src/datavisualization/data/qitemmodelbardataproxy.h @@ -32,7 +32,7 @@ #include <QtDataVisualization/qbardataproxy.h> #include <QtCore/QAbstractItemModel> -#include <QtCore/QRegExp> +#include <QtCore/QRegularExpression> QT_BEGIN_NAMESPACE_DATAVISUALIZATION @@ -52,10 +52,10 @@ class QT_DATAVISUALIZATION_EXPORT QItemModelBarDataProxy : public QBarDataProxy Q_PROPERTY(bool useModelCategories READ useModelCategories WRITE setUseModelCategories NOTIFY useModelCategoriesChanged) Q_PROPERTY(bool autoRowCategories READ autoRowCategories WRITE setAutoRowCategories NOTIFY autoRowCategoriesChanged) Q_PROPERTY(bool autoColumnCategories READ autoColumnCategories WRITE setAutoColumnCategories NOTIFY autoColumnCategoriesChanged) - Q_PROPERTY(QRegExp rowRolePattern READ rowRolePattern WRITE setRowRolePattern NOTIFY rowRolePatternChanged REVISION 1) - Q_PROPERTY(QRegExp columnRolePattern READ columnRolePattern WRITE setColumnRolePattern NOTIFY columnRolePatternChanged REVISION 1) - Q_PROPERTY(QRegExp valueRolePattern READ valueRolePattern WRITE setValueRolePattern NOTIFY valueRolePatternChanged REVISION 1) - Q_PROPERTY(QRegExp rotationRolePattern READ rotationRolePattern WRITE setRotationRolePattern NOTIFY rotationRolePatternChanged REVISION 1) + Q_PROPERTY(QRegularExpression rowRolePattern READ rowRolePattern WRITE setRowRolePattern NOTIFY rowRolePatternChanged REVISION 1) + Q_PROPERTY(QRegularExpression columnRolePattern READ columnRolePattern WRITE setColumnRolePattern NOTIFY columnRolePatternChanged REVISION 1) + Q_PROPERTY(QRegularExpression valueRolePattern READ valueRolePattern WRITE setValueRolePattern NOTIFY valueRolePatternChanged REVISION 1) + Q_PROPERTY(QRegularExpression rotationRolePattern READ rotationRolePattern WRITE setRotationRolePattern NOTIFY rotationRolePatternChanged REVISION 1) Q_PROPERTY(QString rowRoleReplace READ rowRoleReplace WRITE setRowRoleReplace NOTIFY rowRoleReplaceChanged REVISION 1) Q_PROPERTY(QString columnRoleReplace READ columnRoleReplace WRITE setColumnRoleReplace NOTIFY columnRoleReplaceChanged REVISION 1) Q_PROPERTY(QString valueRoleReplace READ valueRoleReplace WRITE setValueRoleReplace NOTIFY valueRoleReplaceChanged REVISION 1) @@ -122,14 +122,14 @@ public: Q_INVOKABLE int rowCategoryIndex(const QString& category); Q_INVOKABLE int columnCategoryIndex(const QString& category); - void setRowRolePattern(const QRegExp &pattern); - QRegExp rowRolePattern() const; - void setColumnRolePattern(const QRegExp &pattern); - QRegExp columnRolePattern() const; - void setValueRolePattern(const QRegExp &pattern); - QRegExp valueRolePattern() const; - void setRotationRolePattern(const QRegExp &pattern); - QRegExp rotationRolePattern() const; + void setRowRolePattern(const QRegularExpression &pattern); + QRegularExpression rowRolePattern() const; + void setColumnRolePattern(const QRegularExpression &pattern); + QRegularExpression columnRolePattern() const; + void setValueRolePattern(const QRegularExpression &pattern); + QRegularExpression valueRolePattern() const; + void setRotationRolePattern(const QRegularExpression &pattern); + QRegularExpression rotationRolePattern() const; void setRowRoleReplace(const QString &replace); QString rowRoleReplace() const; @@ -154,10 +154,10 @@ Q_SIGNALS: void useModelCategoriesChanged(bool enable); void autoRowCategoriesChanged(bool enable); void autoColumnCategoriesChanged(bool enable); - Q_REVISION(1) void rowRolePatternChanged(const QRegExp &pattern); - Q_REVISION(1) void columnRolePatternChanged(const QRegExp &pattern); - Q_REVISION(1) void valueRolePatternChanged(const QRegExp &pattern); - Q_REVISION(1) void rotationRolePatternChanged(const QRegExp &pattern); + Q_REVISION(1) void rowRolePatternChanged(const QRegularExpression &pattern); + Q_REVISION(1) void columnRolePatternChanged(const QRegularExpression &pattern); + Q_REVISION(1) void valueRolePatternChanged(const QRegularExpression &pattern); + Q_REVISION(1) void rotationRolePatternChanged(const QRegularExpression &pattern); Q_REVISION(1) void rowRoleReplaceChanged(const QString &replace); Q_REVISION(1) void columnRoleReplaceChanged(const QString &replace); Q_REVISION(1) void valueRoleReplaceChanged(const QString &replace); diff --git a/src/datavisualization/data/qitemmodelbardataproxy_p.h b/src/datavisualization/data/qitemmodelbardataproxy_p.h index a4eefbcd..7b9b691a 100644 --- a/src/datavisualization/data/qitemmodelbardataproxy_p.h +++ b/src/datavisualization/data/qitemmodelbardataproxy_p.h @@ -74,10 +74,10 @@ private: bool m_autoRowCategories; bool m_autoColumnCategories; - QRegExp m_rowRolePattern; - QRegExp m_columnRolePattern; - QRegExp m_valueRolePattern; - QRegExp m_rotationRolePattern; + QRegularExpression m_rowRolePattern; + QRegularExpression m_columnRolePattern; + QRegularExpression m_valueRolePattern; + QRegularExpression m_rotationRolePattern; QString m_rowRoleReplace; QString m_columnRoleReplace; diff --git a/src/datavisualization/data/qitemmodelscatterdataproxy.cpp b/src/datavisualization/data/qitemmodelscatterdataproxy.cpp index 58180e69..a2c7e41a 100644 --- a/src/datavisualization/data/qitemmodelscatterdataproxy.cpp +++ b/src/datavisualization/data/qitemmodelscatterdataproxy.cpp @@ -59,7 +59,7 @@ QT_BEGIN_NAMESPACE_DATAVISUALIZATION * If the fields of the model do not contain the data in the exact format you need, you can specify * a search pattern regular expression and a replace rule for each role to get the value in a * format you need. For more information how the replace using regular expressions works, see - * QString::replace(const QRegExp &rx, const QString &after) function documentation. Note that + * QString::replace(const QRegularExpression &rx, const QString &after) function documentation. Note that * using regular expressions has an impact on the performance, so it's more efficient to utilize * item models where doing search and replace is not necessary to get the desired values. * @@ -170,7 +170,7 @@ QT_BEGIN_NAMESPACE_DATAVISUALIZATION * * This property defines the replace content to be used in conjunction with xPosRolePattern. * Defaults to an empty string. For more information on how the search and replace using regular - * expressions works, see QString::replace(const QRegExp &rx, const QString &after) + * expressions works, see QString::replace(const QRegularExpression &rx, const QString &after) * function documentation. * * \sa xPosRole, xPosRolePattern @@ -181,7 +181,7 @@ QT_BEGIN_NAMESPACE_DATAVISUALIZATION * * This property defines the replace content to be used in conjunction with yPosRolePattern. * Defaults to an empty string. For more information on how the search and replace using regular - * expressions works, see QString::replace(const QRegExp &rx, const QString &after) + * expressions works, see QString::replace(const QRegularExpression &rx, const QString &after) * function documentation. * * \sa yPosRole, yPosRolePattern @@ -192,7 +192,7 @@ QT_BEGIN_NAMESPACE_DATAVISUALIZATION * * This property defines the replace content to be used in conjunction with zPosRolePattern. * Defaults to an empty string. For more information on how the search and replace using regular - * expressions works, see QString::replace(const QRegExp &rx, const QString &after) + * expressions works, see QString::replace(const QRegularExpression &rx, const QString &after) * function documentation. * * \sa zPosRole, zPosRolePattern @@ -202,7 +202,7 @@ QT_BEGIN_NAMESPACE_DATAVISUALIZATION * \qmlproperty string ItemModelScatterDataProxy::rotationRoleReplace * This property defines the replace content to be used in conjunction with rotationRolePattern. * Defaults to an empty string. For more information on how the search and replace using regular - * expressions works, see QString::replace(const QRegExp &rx, const QString &after) + * expressions works, see QString::replace(const QRegularExpression &rx, const QString &after) * function documentation. * * \sa rotationRole, rotationRolePattern @@ -386,7 +386,7 @@ QString QItemModelScatterDataProxy::rotationRole() const * * \sa xPosRole, xPosRoleReplace */ -void QItemModelScatterDataProxy::setXPosRolePattern(const QRegExp &pattern) +void QItemModelScatterDataProxy::setXPosRolePattern(const QRegularExpression &pattern) { if (dptr()->m_xPosRolePattern != pattern) { dptr()->m_xPosRolePattern = pattern; @@ -394,7 +394,7 @@ void QItemModelScatterDataProxy::setXPosRolePattern(const QRegExp &pattern) } } -QRegExp QItemModelScatterDataProxy::xPosRolePattern() const +QRegularExpression QItemModelScatterDataProxy::xPosRolePattern() const { return dptrc()->m_xPosRolePattern; } @@ -410,7 +410,7 @@ QRegExp QItemModelScatterDataProxy::xPosRolePattern() const * * \sa yPosRole, yPosRoleReplace */ -void QItemModelScatterDataProxy::setYPosRolePattern(const QRegExp &pattern) +void QItemModelScatterDataProxy::setYPosRolePattern(const QRegularExpression &pattern) { if (dptr()->m_yPosRolePattern != pattern) { dptr()->m_yPosRolePattern = pattern; @@ -418,7 +418,7 @@ void QItemModelScatterDataProxy::setYPosRolePattern(const QRegExp &pattern) } } -QRegExp QItemModelScatterDataProxy::yPosRolePattern() const +QRegularExpression QItemModelScatterDataProxy::yPosRolePattern() const { return dptrc()->m_yPosRolePattern; } @@ -434,7 +434,7 @@ QRegExp QItemModelScatterDataProxy::yPosRolePattern() const * * \sa zPosRole, zPosRoleReplace */ -void QItemModelScatterDataProxy::setZPosRolePattern(const QRegExp &pattern) +void QItemModelScatterDataProxy::setZPosRolePattern(const QRegularExpression &pattern) { if (dptr()->m_zPosRolePattern != pattern) { dptr()->m_zPosRolePattern = pattern; @@ -442,7 +442,7 @@ void QItemModelScatterDataProxy::setZPosRolePattern(const QRegExp &pattern) } } -QRegExp QItemModelScatterDataProxy::zPosRolePattern() const +QRegularExpression QItemModelScatterDataProxy::zPosRolePattern() const { return dptrc()->m_zPosRolePattern; } @@ -458,7 +458,7 @@ QRegExp QItemModelScatterDataProxy::zPosRolePattern() const * * \sa rotationRole, rotationRoleReplace */ -void QItemModelScatterDataProxy::setRotationRolePattern(const QRegExp &pattern) +void QItemModelScatterDataProxy::setRotationRolePattern(const QRegularExpression &pattern) { if (dptr()->m_rotationRolePattern != pattern) { dptr()->m_rotationRolePattern = pattern; @@ -466,7 +466,7 @@ void QItemModelScatterDataProxy::setRotationRolePattern(const QRegExp &pattern) } } -QRegExp QItemModelScatterDataProxy::rotationRolePattern() const +QRegularExpression QItemModelScatterDataProxy::rotationRolePattern() const { return dptrc()->m_rotationRolePattern; } @@ -478,7 +478,7 @@ QRegExp QItemModelScatterDataProxy::rotationRolePattern() const * pattern. * * Defaults to an empty string. For more information on how the search and replace using regular - * expressions works, see QString::replace(const QRegExp &rx, const QString &after) + * expressions works, see QString::replace(const QRegularExpression &rx, const QString &after) * function documentation. * * \sa xPosRole, xPosRolePattern @@ -503,7 +503,7 @@ QString QItemModelScatterDataProxy::xPosRoleReplace() const * pattern. * * Defaults to an empty string. For more information on how the search and replace using regular - * expressions works, see QString::replace(const QRegExp &rx, const QString &after) + * expressions works, see QString::replace(const QRegularExpression &rx, const QString &after) * function documentation. * * \sa yPosRole, yPosRolePattern @@ -528,7 +528,7 @@ QString QItemModelScatterDataProxy::yPosRoleReplace() const * pattern. * * Defaults to an empty string. For more information on how the search and replace using regular - * expressions works, see QString::replace(const QRegExp &rx, const QString &after) + * expressions works, see QString::replace(const QRegularExpression &rx, const QString &after) * function documentation. * * \sa zPosRole, zPosRolePattern @@ -553,7 +553,7 @@ QString QItemModelScatterDataProxy::zPosRoleReplace() const * pattern. * * Defaults to an empty string. For more information on how the search and replace using regular - * expressions works, see QString::replace(const QRegExp &rx, const QString &after) + * expressions works, see QString::replace(const QRegularExpression &rx, const QString &after) * function documentation. * * \sa rotationRole, rotationRolePattern diff --git a/src/datavisualization/data/qitemmodelscatterdataproxy.h b/src/datavisualization/data/qitemmodelscatterdataproxy.h index 9a85c4aa..ae321b65 100644 --- a/src/datavisualization/data/qitemmodelscatterdataproxy.h +++ b/src/datavisualization/data/qitemmodelscatterdataproxy.h @@ -33,7 +33,7 @@ #include <QtDataVisualization/qscatterdataproxy.h> #include <QtCore/QAbstractItemModel> #include <QtCore/QString> -#include <QtCore/QRegExp> +#include <QtCore/QRegularExpression> QT_BEGIN_NAMESPACE_DATAVISUALIZATION @@ -47,10 +47,10 @@ class QT_DATAVISUALIZATION_EXPORT QItemModelScatterDataProxy : public QScatterDa Q_PROPERTY(QString yPosRole READ yPosRole WRITE setYPosRole NOTIFY yPosRoleChanged) Q_PROPERTY(QString zPosRole READ zPosRole WRITE setZPosRole NOTIFY zPosRoleChanged) Q_PROPERTY(QString rotationRole READ rotationRole WRITE setRotationRole NOTIFY rotationRoleChanged) - Q_PROPERTY(QRegExp xPosRolePattern READ xPosRolePattern WRITE setXPosRolePattern NOTIFY xPosRolePatternChanged REVISION 1) - Q_PROPERTY(QRegExp yPosRolePattern READ yPosRolePattern WRITE setYPosRolePattern NOTIFY yPosRolePatternChanged REVISION 1) - Q_PROPERTY(QRegExp zPosRolePattern READ zPosRolePattern WRITE setZPosRolePattern NOTIFY zPosRolePatternChanged REVISION 1) - Q_PROPERTY(QRegExp rotationRolePattern READ rotationRolePattern WRITE setRotationRolePattern NOTIFY rotationRolePatternChanged REVISION 1) + Q_PROPERTY(QRegularExpression xPosRolePattern READ xPosRolePattern WRITE setXPosRolePattern NOTIFY xPosRolePatternChanged REVISION 1) + Q_PROPERTY(QRegularExpression yPosRolePattern READ yPosRolePattern WRITE setYPosRolePattern NOTIFY yPosRolePatternChanged REVISION 1) + Q_PROPERTY(QRegularExpression zPosRolePattern READ zPosRolePattern WRITE setZPosRolePattern NOTIFY zPosRolePatternChanged REVISION 1) + Q_PROPERTY(QRegularExpression rotationRolePattern READ rotationRolePattern WRITE setRotationRolePattern NOTIFY rotationRolePatternChanged REVISION 1) Q_PROPERTY(QString xPosRoleReplace READ xPosRoleReplace WRITE setXPosRoleReplace NOTIFY xPosRoleReplaceChanged REVISION 1) Q_PROPERTY(QString yPosRoleReplace READ yPosRoleReplace WRITE setYPosRoleReplace NOTIFY yPosRoleReplaceChanged REVISION 1) Q_PROPERTY(QString zPosRoleReplace READ zPosRoleReplace WRITE setZPosRoleReplace NOTIFY zPosRoleReplaceChanged REVISION 1) @@ -83,14 +83,14 @@ public: void remap(const QString &xPosRole, const QString &yPosRole, const QString &zPosRole, const QString &rotationRole); - void setXPosRolePattern(const QRegExp &pattern); - QRegExp xPosRolePattern() const; - void setYPosRolePattern(const QRegExp &pattern); - QRegExp yPosRolePattern() const; - void setZPosRolePattern(const QRegExp &pattern); - QRegExp zPosRolePattern() const; - void setRotationRolePattern(const QRegExp &pattern); - QRegExp rotationRolePattern() const; + void setXPosRolePattern(const QRegularExpression &pattern); + QRegularExpression xPosRolePattern() const; + void setYPosRolePattern(const QRegularExpression &pattern); + QRegularExpression yPosRolePattern() const; + void setZPosRolePattern(const QRegularExpression &pattern); + QRegularExpression zPosRolePattern() const; + void setRotationRolePattern(const QRegularExpression &pattern); + QRegularExpression rotationRolePattern() const; void setXPosRoleReplace(const QString &replace); QString xPosRoleReplace() const; @@ -107,10 +107,10 @@ Q_SIGNALS: void yPosRoleChanged(const QString &role); void zPosRoleChanged(const QString &role); void rotationRoleChanged(const QString &role); - Q_REVISION(1) void xPosRolePatternChanged(const QRegExp &pattern); - Q_REVISION(1) void yPosRolePatternChanged(const QRegExp &pattern); - Q_REVISION(1) void zPosRolePatternChanged(const QRegExp &pattern); - Q_REVISION(1) void rotationRolePatternChanged(const QRegExp &pattern); + Q_REVISION(1) void xPosRolePatternChanged(const QRegularExpression &pattern); + Q_REVISION(1) void yPosRolePatternChanged(const QRegularExpression &pattern); + Q_REVISION(1) void zPosRolePatternChanged(const QRegularExpression &pattern); + Q_REVISION(1) void rotationRolePatternChanged(const QRegularExpression &pattern); Q_REVISION(1) void rotationRoleReplaceChanged(const QString &replace); Q_REVISION(1) void xPosRoleReplaceChanged(const QString &replace); Q_REVISION(1) void yPosRoleReplaceChanged(const QString &replace); diff --git a/src/datavisualization/data/qitemmodelscatterdataproxy_p.h b/src/datavisualization/data/qitemmodelscatterdataproxy_p.h index a8d3c0e6..cb433a30 100644 --- a/src/datavisualization/data/qitemmodelscatterdataproxy_p.h +++ b/src/datavisualization/data/qitemmodelscatterdataproxy_p.h @@ -65,10 +65,10 @@ private: QString m_zPosRole; QString m_rotationRole; - QRegExp m_xPosRolePattern; - QRegExp m_yPosRolePattern; - QRegExp m_zPosRolePattern; - QRegExp m_rotationRolePattern; + QRegularExpression m_xPosRolePattern; + QRegularExpression m_yPosRolePattern; + QRegularExpression m_zPosRolePattern; + QRegularExpression m_rotationRolePattern; QString m_xPosRoleReplace; QString m_yPosRoleReplace; diff --git a/src/datavisualization/data/qitemmodelsurfacedataproxy.cpp b/src/datavisualization/data/qitemmodelsurfacedataproxy.cpp index 47230326..0fa50fb2 100644 --- a/src/datavisualization/data/qitemmodelsurfacedataproxy.cpp +++ b/src/datavisualization/data/qitemmodelsurfacedataproxy.cpp @@ -82,7 +82,7 @@ QT_BEGIN_NAMESPACE_DATAVISUALIZATION * If the fields of the model do not contain the data in the exact format you need, you can specify * a search pattern regular expression and a replace rule for each role to get the value in a * format you need. For more information how the replace using regular expressions works, see - * QString::replace(const QRegExp &rx, const QString &after) function documentation. Note that + * QString::replace(const QRegularExpression &rx, const QString &after) function documentation. Note that * using regular expressions has an impact on the performance, so it's more efficient to utilize * item models where doing search and replace is not necessary to get the desired values. * @@ -251,7 +251,7 @@ QT_BEGIN_NAMESPACE_DATAVISUALIZATION * The replace content to be used in conjunction with rowRolePattern. * Defaults to an empty string. For more information on how the search and * replace using regular expressions works, see the - * QString::replace(const QRegExp &rx, const QString &after) + * QString::replace(const QRegularExpression &rx, const QString &after) * function documentation. * * \sa rowRole, rowRolePattern @@ -263,7 +263,7 @@ QT_BEGIN_NAMESPACE_DATAVISUALIZATION * The replace content to be used in conjunction with columnRolePattern. * Defaults to an empty string. For more information on how the search and * replace using regular expressions works, see the - * QString::replace(const QRegExp &rx, const QString &after) + * QString::replace(const QRegularExpression &rx, const QString &after) * function documentation. * * \sa columnRole, columnRolePattern @@ -275,7 +275,7 @@ QT_BEGIN_NAMESPACE_DATAVISUALIZATION * The replace content to be used in conjunction with xPosRolePattern. * Defaults to an empty string. For more information on how the search and * replace using regular expressions works, see the - * QString::replace(const QRegExp &rx, const QString &after) + * QString::replace(const QRegularExpression &rx, const QString &after) * function documentation. * * \sa xPosRole, xPosRolePattern @@ -287,7 +287,7 @@ QT_BEGIN_NAMESPACE_DATAVISUALIZATION * The replace content to be used in conjunction with yPosRolePattern. * Defaults to an empty string. For more information on how the search and * replace using regular expressions works, see the - * QString::replace(const QRegExp &rx, const QString &after) + * QString::replace(const QRegularExpression &rx, const QString &after) * function documentation. * * \sa yPosRole, yPosRolePattern @@ -299,7 +299,7 @@ QT_BEGIN_NAMESPACE_DATAVISUALIZATION * The replace content to be used in conjunction with zPosRolePattern. * Defaults to an empty string. For more information on how the search and * replace using regular expressions works, see the - * QString::replace(const QRegExp &rx, const QString &after) + * QString::replace(const QRegularExpression &rx, const QString &after) * function documentation. * * \sa zPosRole, zPosRolePattern @@ -770,7 +770,7 @@ int QItemModelSurfaceDataProxy::columnCategoryIndex(const QString &category) * * \sa rowRole, rowRoleReplace */ -void QItemModelSurfaceDataProxy::setRowRolePattern(const QRegExp &pattern) +void QItemModelSurfaceDataProxy::setRowRolePattern(const QRegularExpression &pattern) { if (dptr()->m_rowRolePattern != pattern) { dptr()->m_rowRolePattern = pattern; @@ -778,7 +778,7 @@ void QItemModelSurfaceDataProxy::setRowRolePattern(const QRegExp &pattern) } } -QRegExp QItemModelSurfaceDataProxy::rowRolePattern() const +QRegularExpression QItemModelSurfaceDataProxy::rowRolePattern() const { return dptrc()->m_rowRolePattern; } @@ -795,7 +795,7 @@ QRegExp QItemModelSurfaceDataProxy::rowRolePattern() const * * \sa columnRole, columnRoleReplace */ -void QItemModelSurfaceDataProxy::setColumnRolePattern(const QRegExp &pattern) +void QItemModelSurfaceDataProxy::setColumnRolePattern(const QRegularExpression &pattern) { if (dptr()->m_columnRolePattern != pattern) { dptr()->m_columnRolePattern = pattern; @@ -803,7 +803,7 @@ void QItemModelSurfaceDataProxy::setColumnRolePattern(const QRegExp &pattern) } } -QRegExp QItemModelSurfaceDataProxy::columnRolePattern() const +QRegularExpression QItemModelSurfaceDataProxy::columnRolePattern() const { return dptrc()->m_columnRolePattern; } @@ -820,7 +820,7 @@ QRegExp QItemModelSurfaceDataProxy::columnRolePattern() const * * \sa xPosRole, xPosRoleReplace */ -void QItemModelSurfaceDataProxy::setXPosRolePattern(const QRegExp &pattern) +void QItemModelSurfaceDataProxy::setXPosRolePattern(const QRegularExpression &pattern) { if (dptr()->m_xPosRolePattern != pattern) { dptr()->m_xPosRolePattern = pattern; @@ -828,7 +828,7 @@ void QItemModelSurfaceDataProxy::setXPosRolePattern(const QRegExp &pattern) } } -QRegExp QItemModelSurfaceDataProxy::xPosRolePattern() const +QRegularExpression QItemModelSurfaceDataProxy::xPosRolePattern() const { return dptrc()->m_xPosRolePattern; } @@ -845,7 +845,7 @@ QRegExp QItemModelSurfaceDataProxy::xPosRolePattern() const * * \sa yPosRole, yPosRoleReplace */ -void QItemModelSurfaceDataProxy::setYPosRolePattern(const QRegExp &pattern) +void QItemModelSurfaceDataProxy::setYPosRolePattern(const QRegularExpression &pattern) { if (dptr()->m_yPosRolePattern != pattern) { dptr()->m_yPosRolePattern = pattern; @@ -853,7 +853,7 @@ void QItemModelSurfaceDataProxy::setYPosRolePattern(const QRegExp &pattern) } } -QRegExp QItemModelSurfaceDataProxy::yPosRolePattern() const +QRegularExpression QItemModelSurfaceDataProxy::yPosRolePattern() const { return dptrc()->m_yPosRolePattern; } @@ -870,7 +870,7 @@ QRegExp QItemModelSurfaceDataProxy::yPosRolePattern() const * * \sa zPosRole, zPosRoleReplace */ -void QItemModelSurfaceDataProxy::setZPosRolePattern(const QRegExp &pattern) +void QItemModelSurfaceDataProxy::setZPosRolePattern(const QRegularExpression &pattern) { if (dptr()->m_zPosRolePattern != pattern) { dptr()->m_zPosRolePattern = pattern; @@ -878,7 +878,7 @@ void QItemModelSurfaceDataProxy::setZPosRolePattern(const QRegExp &pattern) } } -QRegExp QItemModelSurfaceDataProxy::zPosRolePattern() const +QRegularExpression QItemModelSurfaceDataProxy::zPosRolePattern() const { return dptrc()->m_zPosRolePattern; } @@ -890,7 +890,7 @@ QRegExp QItemModelSurfaceDataProxy::zPosRolePattern() const * pattern. * * Defaults to an empty string. For more information on how the search and replace using regular - * expressions works, see QString::replace(const QRegExp &rx, const QString &after) + * expressions works, see QString::replace(const QRegularExpression &rx, const QString &after) * function documentation. * * \sa rowRole, rowRolePattern @@ -916,7 +916,7 @@ QString QItemModelSurfaceDataProxy::rowRoleReplace() const * * Defaults to an empty string. For more information on how the search and * replace using regular expressions works, see the - * QString::replace(const QRegExp &rx, const QString &after) + * QString::replace(const QRegularExpression &rx, const QString &after) * function documentation. * * \sa columnRole, columnRolePattern @@ -942,7 +942,7 @@ QString QItemModelSurfaceDataProxy::columnRoleReplace() const * * Defaults to an empty string. For more information on how the search and * replace using regular expressions works, see the - * QString::replace(const QRegExp &rx, const QString &after) + * QString::replace(const QRegularExpression &rx, const QString &after) * function documentation. * * \sa xPosRole, xPosRolePattern @@ -968,7 +968,7 @@ QString QItemModelSurfaceDataProxy::xPosRoleReplace() const * * Defaults to an empty string. For more information on how the search and * replace using regular expressions works, see the - * QString::replace(const QRegExp &rx, const QString &after) + * QString::replace(const QRegularExpression &rx, const QString &after) * function documentation. * * \sa yPosRole, yPosRolePattern @@ -994,7 +994,7 @@ QString QItemModelSurfaceDataProxy::yPosRoleReplace() const * * Defaults to an empty string. For more information on how the search and * replace using regular expressions works, see the - * QString::replace(const QRegExp &rx, const QString &after) + * QString::replace(const QRegularExpression &rx, const QString &after) * function documentation. * * \sa zPosRole, zPosRolePattern diff --git a/src/datavisualization/data/qitemmodelsurfacedataproxy.h b/src/datavisualization/data/qitemmodelsurfacedataproxy.h index ec94c1f0..52af2d19 100644 --- a/src/datavisualization/data/qitemmodelsurfacedataproxy.h +++ b/src/datavisualization/data/qitemmodelsurfacedataproxy.h @@ -33,7 +33,7 @@ #include <QtDataVisualization/qsurfacedataproxy.h> #include <QtCore/QAbstractItemModel> #include <QtCore/QStringList> -#include <QtCore/QRegExp> +#include <QtCore/QRegularExpression> QT_BEGIN_NAMESPACE_DATAVISUALIZATION @@ -54,11 +54,11 @@ class QT_DATAVISUALIZATION_EXPORT QItemModelSurfaceDataProxy : public QSurfaceDa Q_PROPERTY(bool useModelCategories READ useModelCategories WRITE setUseModelCategories NOTIFY useModelCategoriesChanged) Q_PROPERTY(bool autoRowCategories READ autoRowCategories WRITE setAutoRowCategories NOTIFY autoRowCategoriesChanged) Q_PROPERTY(bool autoColumnCategories READ autoColumnCategories WRITE setAutoColumnCategories NOTIFY autoColumnCategoriesChanged) - Q_PROPERTY(QRegExp rowRolePattern READ rowRolePattern WRITE setRowRolePattern NOTIFY rowRolePatternChanged REVISION 1) - Q_PROPERTY(QRegExp columnRolePattern READ columnRolePattern WRITE setColumnRolePattern NOTIFY columnRolePatternChanged REVISION 1) - Q_PROPERTY(QRegExp xPosRolePattern READ xPosRolePattern WRITE setXPosRolePattern NOTIFY xPosRolePatternChanged REVISION 1) - Q_PROPERTY(QRegExp yPosRolePattern READ yPosRolePattern WRITE setYPosRolePattern NOTIFY yPosRolePatternChanged REVISION 1) - Q_PROPERTY(QRegExp zPosRolePattern READ zPosRolePattern WRITE setZPosRolePattern NOTIFY zPosRolePatternChanged REVISION 1) + Q_PROPERTY(QRegularExpression rowRolePattern READ rowRolePattern WRITE setRowRolePattern NOTIFY rowRolePatternChanged REVISION 1) + Q_PROPERTY(QRegularExpression columnRolePattern READ columnRolePattern WRITE setColumnRolePattern NOTIFY columnRolePatternChanged REVISION 1) + Q_PROPERTY(QRegularExpression xPosRolePattern READ xPosRolePattern WRITE setXPosRolePattern NOTIFY xPosRolePatternChanged REVISION 1) + Q_PROPERTY(QRegularExpression yPosRolePattern READ yPosRolePattern WRITE setYPosRolePattern NOTIFY yPosRolePatternChanged REVISION 1) + Q_PROPERTY(QRegularExpression zPosRolePattern READ zPosRolePattern WRITE setZPosRolePattern NOTIFY zPosRolePatternChanged REVISION 1) Q_PROPERTY(QString rowRoleReplace READ rowRoleReplace WRITE setRowRoleReplace NOTIFY rowRoleReplaceChanged REVISION 1) Q_PROPERTY(QString columnRoleReplace READ columnRoleReplace WRITE setColumnRoleReplace NOTIFY columnRoleReplaceChanged REVISION 1) Q_PROPERTY(QString xPosRoleReplace READ xPosRoleReplace WRITE setXPosRoleReplace NOTIFY xPosRoleReplaceChanged REVISION 1) @@ -132,16 +132,16 @@ public: Q_INVOKABLE int rowCategoryIndex(const QString& category); Q_INVOKABLE int columnCategoryIndex(const QString& category); - void setRowRolePattern(const QRegExp &pattern); - QRegExp rowRolePattern() const; - void setColumnRolePattern(const QRegExp &pattern); - QRegExp columnRolePattern() const; - void setXPosRolePattern(const QRegExp &pattern); - QRegExp xPosRolePattern() const; - void setYPosRolePattern(const QRegExp &pattern); - QRegExp yPosRolePattern() const; - void setZPosRolePattern(const QRegExp &pattern); - QRegExp zPosRolePattern() const; + void setRowRolePattern(const QRegularExpression &pattern); + QRegularExpression rowRolePattern() const; + void setColumnRolePattern(const QRegularExpression &pattern); + QRegularExpression columnRolePattern() const; + void setXPosRolePattern(const QRegularExpression &pattern); + QRegularExpression xPosRolePattern() const; + void setYPosRolePattern(const QRegularExpression &pattern); + QRegularExpression yPosRolePattern() const; + void setZPosRolePattern(const QRegularExpression &pattern); + QRegularExpression zPosRolePattern() const; void setRowRoleReplace(const QString &replace); QString rowRoleReplace() const; @@ -169,11 +169,11 @@ Q_SIGNALS: void useModelCategoriesChanged(bool enable); void autoRowCategoriesChanged(bool enable); void autoColumnCategoriesChanged(bool enable); - Q_REVISION(1) void rowRolePatternChanged(const QRegExp &pattern); - Q_REVISION(1) void columnRolePatternChanged(const QRegExp &pattern); - Q_REVISION(1) void xPosRolePatternChanged(const QRegExp &pattern); - Q_REVISION(1) void yPosRolePatternChanged(const QRegExp &pattern); - Q_REVISION(1) void zPosRolePatternChanged(const QRegExp &pattern); + Q_REVISION(1) void rowRolePatternChanged(const QRegularExpression &pattern); + Q_REVISION(1) void columnRolePatternChanged(const QRegularExpression &pattern); + Q_REVISION(1) void xPosRolePatternChanged(const QRegularExpression &pattern); + Q_REVISION(1) void yPosRolePatternChanged(const QRegularExpression &pattern); + Q_REVISION(1) void zPosRolePatternChanged(const QRegularExpression &pattern); Q_REVISION(1) void rowRoleReplaceChanged(const QString &replace); Q_REVISION(1) void columnRoleReplaceChanged(const QString &replace); Q_REVISION(1) void xPosRoleReplaceChanged(const QString &replace); diff --git a/src/datavisualization/data/qitemmodelsurfacedataproxy_p.h b/src/datavisualization/data/qitemmodelsurfacedataproxy_p.h index 011a5221..1c8380b6 100644 --- a/src/datavisualization/data/qitemmodelsurfacedataproxy_p.h +++ b/src/datavisualization/data/qitemmodelsurfacedataproxy_p.h @@ -75,11 +75,11 @@ private: bool m_autoRowCategories; bool m_autoColumnCategories; - QRegExp m_rowRolePattern; - QRegExp m_columnRolePattern; - QRegExp m_xPosRolePattern; - QRegExp m_yPosRolePattern; - QRegExp m_zPosRolePattern; + QRegularExpression m_rowRolePattern; + QRegularExpression m_columnRolePattern; + QRegularExpression m_xPosRolePattern; + QRegularExpression m_yPosRolePattern; + QRegularExpression m_zPosRolePattern; QString m_rowRoleReplace; QString m_columnRoleReplace; diff --git a/src/datavisualization/data/scatteritemmodelhandler.cpp b/src/datavisualization/data/scatteritemmodelhandler.cpp index 67b9bb3a..7cbaa8de 100644 --- a/src/datavisualization/data/scatteritemmodelhandler.cpp +++ b/src/datavisualization/data/scatteritemmodelhandler.cpp @@ -211,10 +211,10 @@ void ScatterItemModelHandler::resolveModel() m_yPosReplace = m_proxy->yPosRoleReplace(); m_zPosReplace = m_proxy->zPosRoleReplace(); m_rotationReplace = m_proxy->rotationRoleReplace(); - m_haveXPosPattern = !m_xPosPattern.isEmpty() && m_xPosPattern.isValid(); - m_haveYPosPattern = !m_yPosPattern.isEmpty() && m_yPosPattern.isValid(); - m_haveZPosPattern = !m_zPosPattern.isEmpty() && m_zPosPattern.isValid(); - m_haveRotationPattern = !m_rotationPattern.isEmpty() && m_rotationPattern.isValid(); + m_haveXPosPattern = !m_xPosPattern.namedCaptureGroups().isEmpty() && m_xPosPattern.isValid(); + m_haveYPosPattern = !m_yPosPattern.namedCaptureGroups().isEmpty() && m_yPosPattern.isValid(); + m_haveZPosPattern = !m_zPosPattern.namedCaptureGroups().isEmpty() && m_zPosPattern.isValid(); + m_haveRotationPattern = !m_rotationPattern.namedCaptureGroups().isEmpty() && m_rotationPattern.isValid(); QHash<int, QByteArray> roleHash = m_itemModel->roleNames(); m_xPosRole = roleHash.key(m_proxy->xPosRole().toLatin1(), noRoleIndex); diff --git a/src/datavisualization/data/scatteritemmodelhandler_p.h b/src/datavisualization/data/scatteritemmodelhandler_p.h index c74b2e51..41320d0c 100644 --- a/src/datavisualization/data/scatteritemmodelhandler_p.h +++ b/src/datavisualization/data/scatteritemmodelhandler_p.h @@ -70,10 +70,10 @@ private: int m_yPosRole; int m_zPosRole; int m_rotationRole; - QRegExp m_xPosPattern; - QRegExp m_yPosPattern; - QRegExp m_zPosPattern; - QRegExp m_rotationPattern; + QRegularExpression m_xPosPattern; + QRegularExpression m_yPosPattern; + QRegularExpression m_zPosPattern; + QRegularExpression m_rotationPattern; QString m_xPosReplace; QString m_yPosReplace; QString m_zPosReplace; diff --git a/src/datavisualization/data/surfaceitemmodelhandler.cpp b/src/datavisualization/data/surfaceitemmodelhandler.cpp index 122499be..7121d38a 100644 --- a/src/datavisualization/data/surfaceitemmodelhandler.cpp +++ b/src/datavisualization/data/surfaceitemmodelhandler.cpp @@ -123,8 +123,8 @@ void SurfaceItemModelHandler::resolveModel() } // Position patterns can be reused on single item changes, so store them to member variables. - QRegExp rowPattern(m_proxy->rowRolePattern()); - QRegExp colPattern(m_proxy->columnRolePattern()); + QRegularExpression rowPattern(m_proxy->rowRolePattern()); + QRegularExpression colPattern(m_proxy->columnRolePattern()); m_xPosPattern = m_proxy->xPosRolePattern(); m_yPosPattern = m_proxy->yPosRolePattern(); m_zPosPattern = m_proxy->zPosRolePattern(); @@ -133,11 +133,11 @@ void SurfaceItemModelHandler::resolveModel() m_xPosReplace = m_proxy->xPosRoleReplace(); m_yPosReplace = m_proxy->yPosRoleReplace(); m_zPosReplace = m_proxy->zPosRoleReplace(); - bool haveRowPattern = !rowPattern.isEmpty() && rowPattern.isValid(); - bool haveColPattern = !colPattern.isEmpty() && colPattern.isValid(); - m_haveXPosPattern = !m_xPosPattern.isEmpty() && m_xPosPattern.isValid(); - m_haveYPosPattern = !m_yPosPattern.isEmpty() && m_yPosPattern.isValid(); - m_haveZPosPattern = !m_zPosPattern.isEmpty() && m_zPosPattern.isValid(); + bool haveRowPattern = !rowPattern.namedCaptureGroups().isEmpty() && rowPattern.isValid(); + bool haveColPattern = !colPattern.namedCaptureGroups().isEmpty() && colPattern.isValid(); + m_haveXPosPattern = !m_xPosPattern.namedCaptureGroups().isEmpty() && m_xPosPattern.isValid(); + m_haveYPosPattern = !m_yPosPattern.namedCaptureGroups().isEmpty() && m_yPosPattern.isValid(); + m_haveZPosPattern = !m_zPosPattern.namedCaptureGroups().isEmpty() && m_zPosPattern.isValid(); QHash<int, QByteArray> roleHash = m_itemModel->roleNames(); diff --git a/src/datavisualization/data/surfaceitemmodelhandler_p.h b/src/datavisualization/data/surfaceitemmodelhandler_p.h index b5d83096..21dfb0eb 100644 --- a/src/datavisualization/data/surfaceitemmodelhandler_p.h +++ b/src/datavisualization/data/surfaceitemmodelhandler_p.h @@ -64,9 +64,9 @@ protected: int m_xPosRole; int m_yPosRole; int m_zPosRole; - QRegExp m_xPosPattern; - QRegExp m_yPosPattern; - QRegExp m_zPosPattern; + QRegularExpression m_xPosPattern; + QRegularExpression m_yPosPattern; + QRegularExpression m_zPosPattern; QString m_xPosReplace; QString m_yPosReplace; QString m_zPosReplace; |