diff options
author | Lars Knoll <lars.knoll@qt.io> | 2020-04-02 09:57:13 +0200 |
---|---|---|
committer | Lars Knoll <lars.knoll@qt.io> | 2020-04-03 21:01:49 +0200 |
commit | 55be24d6b6e66bd54168021f5a467ba4da73b2c6 (patch) | |
tree | 07f3165aebbe539dc506e78f1f4040471d32ab62 /tests/auto/qml/qqmlecmascript | |
parent | e1bc9db85149b89feb73f1690fd218de498b8b27 (diff) |
Remove QRegExp from qml autotests
QRegExp will get removed in Qt6. Clean up by removing dependencies
on QRegExp in the autotests.
Change-Id: I8ef8561ba30b98b61cd9ed52907b48c5969f2c49
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Diffstat (limited to 'tests/auto/qml/qqmlecmascript')
-rw-r--r-- | tests/auto/qml/qqmlecmascript/data/regExp.2.qml | 7 | ||||
-rw-r--r-- | tests/auto/qml/qqmlecmascript/data/regExp.qml | 7 | ||||
-rw-r--r-- | tests/auto/qml/qqmlecmascript/testtypes.h | 5 | ||||
-rw-r--r-- | tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp | 17 |
4 files changed, 0 insertions, 36 deletions
diff --git a/tests/auto/qml/qqmlecmascript/data/regExp.2.qml b/tests/auto/qml/qqmlecmascript/data/regExp.2.qml deleted file mode 100644 index 68cca5733b..0000000000 --- a/tests/auto/qml/qqmlecmascript/data/regExp.2.qml +++ /dev/null @@ -1,7 +0,0 @@ -import Qt.test 1.0 - -MyQmlObject{ - id: obj - objectName: "obj" - regExp: "[a-zA-z]" -} diff --git a/tests/auto/qml/qqmlecmascript/data/regExp.qml b/tests/auto/qml/qqmlecmascript/data/regExp.qml deleted file mode 100644 index 0dc404b5db..0000000000 --- a/tests/auto/qml/qqmlecmascript/data/regExp.qml +++ /dev/null @@ -1,7 +0,0 @@ -import Qt.test 1.0 - -MyQmlObject{ - id: obj - objectName: "obj" - regExp: /[a-zA-z]/ -} diff --git a/tests/auto/qml/qqmlecmascript/testtypes.h b/tests/auto/qml/qqmlecmascript/testtypes.h index 415e884eb8..b999c670a8 100644 --- a/tests/auto/qml/qqmlecmascript/testtypes.h +++ b/tests/auto/qml/qqmlecmascript/testtypes.h @@ -100,7 +100,6 @@ class MyQmlObject : public QObject Q_PROPERTY(QObject *objectProperty READ objectProperty WRITE setObjectProperty NOTIFY objectChanged) Q_PROPERTY(QQmlListProperty<QObject> objectListProperty READ objectListProperty CONSTANT) Q_PROPERTY(int resettableProperty READ resettableProperty WRITE setResettableProperty RESET resetProperty) - Q_PROPERTY(QRegExp regExp READ regExp WRITE setRegExp) Q_PROPERTY(QRegularExpression regularExpression READ regularExpression WRITE setRegularExpression) Q_PROPERTY(int nonscriptable READ nonscriptable WRITE setNonscriptable SCRIPTABLE false) Q_PROPERTY(int intProperty READ intProperty WRITE setIntProperty NOTIFY intChanged) @@ -168,9 +167,6 @@ public: void setResettableProperty(int v) { m_resetProperty = v; } void resetProperty() { m_resetProperty = 13; } - QRegExp regExp() { return m_regExp; } - void setRegExp(const QRegExp ®Exp) { m_regExp = regExp; } - QRegularExpression regularExpression() { return m_regularExpression; } void setRegularExpression(const QRegularExpression ®ularExpression) { @@ -276,7 +272,6 @@ private: QList<QObject *> m_objectQList; int m_value; int m_resetProperty; - QRegExp m_regExp; QRegularExpression m_regularExpression; QVariant m_variant; QJSValue m_qjsvalue; diff --git a/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp b/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp index fc50c2a09f..94a51f7f7b 100644 --- a/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp +++ b/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp @@ -2529,14 +2529,6 @@ void tst_qqmlecmascript::regExpBug() //QTBUG-9367 { - QQmlComponent component(&engine, testFileUrl("regExp.qml")); - MyQmlObject *object = qobject_cast<MyQmlObject*>(component.create()); - QVERIFY(object != nullptr); - QCOMPARE(object->regExp().pattern(), QLatin1String("[a-zA-z]")); - delete object; - } - - { QQmlComponent component(&engine, testFileUrl("regularExpression.qml")); QScopedPointer<MyQmlObject> object(qobject_cast<MyQmlObject*>(component.create())); QVERIFY(!object.isNull()); @@ -2545,15 +2537,6 @@ void tst_qqmlecmascript::regExpBug() //QTBUG-23068 { - QString err = QString(QLatin1String("%1:6 Invalid property assignment: regular expression expected; use /pattern/ syntax\n")).arg(testFileUrl("regExp.2.qml").toString()); - QQmlComponent component(&engine, testFileUrl("regExp.2.qml")); - QTest::ignoreMessage(QtWarningMsg, "QQmlComponent: Component is not ready"); - MyQmlObject *object = qobject_cast<MyQmlObject*>(component.create()); - QVERIFY(!object); - QCOMPARE(component.errorString(), err); - } - - { const QString err = QString::fromLatin1("%1:6 Invalid property assignment: " "regular expression expected; " "use /pattern/ syntax\n") |