diff options
Diffstat (limited to 'tests/auto/quickcontrols/sanity/tst_sanity.cpp')
-rw-r--r-- | tests/auto/quickcontrols/sanity/tst_sanity.cpp | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/tests/auto/quickcontrols/sanity/tst_sanity.cpp b/tests/auto/quickcontrols/sanity/tst_sanity.cpp index 493b717253..01524e4a89 100644 --- a/tests/auto/quickcontrols/sanity/tst_sanity.cpp +++ b/tests/auto/quickcontrols/sanity/tst_sanity.cpp @@ -1,5 +1,5 @@ // Copyright (C) 2017 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #include <QtTest> #include <QtQml> @@ -19,6 +19,8 @@ #include <QtQuickTestUtils/private/qmlutils_p.h> #include <QtQuickControlsTestUtils/private/controlstestutils_p.h> #include <QtQmlCompiler/private/qqmljslinter_p.h> +#include <QtQmlCompiler/private/qqmljstyperesolver_p.h> +#include <QtQmlCompiler/private/qqmljsimportvisitor_p.h> Q_IMPORT_PLUGIN(QuickControlsSanityPlugin) @@ -33,7 +35,7 @@ public: tst_Sanity(); private slots: - void initTestCase(); + void initTestCase() override; void jsFiles(); void qmllint(); @@ -48,7 +50,7 @@ private: QStringList m_importPaths; QQmlJSLinter m_linter; - QList<QQmlJSLogger::Category> m_categories; + QList<QQmlJS::LoggerCategory> m_categories; }; tst_Sanity::tst_Sanity() @@ -64,10 +66,12 @@ tst_Sanity::tst_Sanity() m_linter.setPluginsEnabled(true); for (auto &category : m_categories) { - if (category == qmlDeferredPropertyId || category == qmlAttachedPropertyReuse) { - category.setLevel(u"warning"_s); + if (category.id() == qmlDeferredPropertyId || category.id() == qmlAttachedPropertyReuse) { + category.setLevel(QtWarningMsg); + category.setIgnored(false); } else { - category.setLevel(u"disable"_s); + category.setLevel(QtCriticalMsg); + category.setIgnored(true); } } } |