diff options
Diffstat (limited to 'tests/auto')
-rw-r--r-- | tests/auto/gui/text/qcssparser/tst_qcssparser.cpp | 30 | ||||
-rw-r--r-- | tests/auto/widgets/styles/qstylesheetstyle/tst_qstylesheetstyle.cpp | 2 |
2 files changed, 16 insertions, 16 deletions
diff --git a/tests/auto/gui/text/qcssparser/tst_qcssparser.cpp b/tests/auto/gui/text/qcssparser/tst_qcssparser.cpp index f51c0eab20..7c16f4aa76 100644 --- a/tests/auto/gui/text/qcssparser/tst_qcssparser.cpp +++ b/tests/auto/gui/text/qcssparser/tst_qcssparser.cpp @@ -886,32 +886,34 @@ public: styleSheets.append(sheet); } - virtual QStringList nodeNames(NodePtr node) const override { return QStringList(reinterpret_cast<QDomElement *>(node.ptr)->tagName()); } - virtual QString attribute(NodePtr node, const QString &name) const override { return reinterpret_cast<QDomElement *>(node.ptr)->attribute(name); } - virtual bool hasAttribute(NodePtr node, const QString &name) const { return reinterpret_cast<QDomElement *>(node.ptr)->hasAttribute(name); } - virtual bool hasAttributes(NodePtr node) const override { return reinterpret_cast<QDomElement *>(node.ptr)->hasAttributes(); } - - virtual bool isNullNode(NodePtr node) const override { - return reinterpret_cast<QDomElement *>(node.ptr)->isNull(); - } - virtual NodePtr parentNode(NodePtr node) const override { + QStringList nodeNames(NodePtr node) const override + { return QStringList(reinterpret_cast<QDomElement *>(node.ptr)->tagName()); } + QString attributeValue(NodePtr node, const QCss::AttributeSelector &aSel) const override + { return reinterpret_cast<QDomElement *>(node.ptr)->attribute(aSel.name); } + bool hasAttribute(NodePtr node, const QString &name) const + { return reinterpret_cast<QDomElement *>(node.ptr)->hasAttribute(name); } + bool hasAttributes(NodePtr node) const override + { return reinterpret_cast<QDomElement *>(node.ptr)->hasAttributes(); } + + bool isNullNode(NodePtr node) const override + { return reinterpret_cast<QDomElement *>(node.ptr)->isNull(); } + NodePtr parentNode(NodePtr node) const override { NodePtr parent; parent.ptr = new QDomElement(reinterpret_cast<QDomElement *>(node.ptr)->parentNode().toElement()); return parent; } - virtual NodePtr duplicateNode(NodePtr node) const override { + NodePtr duplicateNode(NodePtr node) const override { NodePtr n; n.ptr = new QDomElement(*reinterpret_cast<QDomElement *>(node.ptr)); return n; } - virtual NodePtr previousSiblingNode(NodePtr node) const override { + NodePtr previousSiblingNode(NodePtr node) const override { NodePtr sibling; sibling.ptr = new QDomElement(reinterpret_cast<QDomElement *>(node.ptr)->previousSiblingElement()); return sibling; } - virtual void freeNode(NodePtr node) const override { - delete reinterpret_cast<QDomElement *>(node.ptr); - } + void freeNode(NodePtr node) const override + { delete reinterpret_cast<QDomElement *>(node.ptr); } private: QDomDocument doc; diff --git a/tests/auto/widgets/styles/qstylesheetstyle/tst_qstylesheetstyle.cpp b/tests/auto/widgets/styles/qstylesheetstyle/tst_qstylesheetstyle.cpp index 6409a669fe..492b206019 100644 --- a/tests/auto/widgets/styles/qstylesheetstyle/tst_qstylesheetstyle.cpp +++ b/tests/auto/widgets/styles/qstylesheetstyle/tst_qstylesheetstyle.cpp @@ -2371,8 +2371,6 @@ void tst_QStyleSheetStyle::enumPropertySelector() #if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) QEXPECT_FAIL("Enum value", "In Qt 5, style sheet selectors have to use integer enum values", Continue); -#else - QEXPECT_FAIL("Int value", "In Qt 6, style sheet selectors must use the enum value name", Continue); #endif QVERIFY(styledSizeHint.width() > unstyledSizeHint.width()); |