diff options
| -rw-r--r-- | src/plugins/qmllint/quick/quicklintplugin.cpp | 18 | ||||
| -rw-r--r-- | src/plugins/qmllint/quick/quicklintplugin.h | 4 | ||||
| -rw-r--r-- | src/qmlcompiler/qqmljslogger.cpp | 72 | ||||
| -rw-r--r-- | src/qmlcompiler/qqmljsloggingutils.cpp | 8 | ||||
| -rw-r--r-- | src/qmlcompiler/qqmljsloggingutils.h | 76 | ||||
| -rw-r--r-- | src/qmlcompiler/qqmljsloggingutils_p.h | 2 | ||||
| -rw-r--r-- | src/qmlcompiler/qqmlsa.cpp | 8 | ||||
| -rw-r--r-- | src/qmlcompiler/qqmlsa.h | 8 | ||||
| -rw-r--r-- | tests/auto/qml/qmllint/lintplugin.cpp | 2 |
9 files changed, 104 insertions, 94 deletions
diff --git a/src/plugins/qmllint/quick/quicklintplugin.cpp b/src/plugins/qmllint/quick/quicklintplugin.cpp index 00d4f558a9..5452b84dfb 100644 --- a/src/plugins/qmllint/quick/quicklintplugin.cpp +++ b/src/plugins/qmllint/quick/quicklintplugin.cpp @@ -7,14 +7,14 @@ QT_BEGIN_NAMESPACE using namespace Qt::StringLiterals; -static constexpr QQmlJS::LoggerWarningId quickLayoutPositioning { "Quick.layout-positioning" }; -static constexpr QQmlJS::LoggerWarningId quickAttachedPropertyType { "Quick.attached-property-type" }; -static constexpr QQmlJS::LoggerWarningId quickControlsNativeCustomize { "Quick.controls-native-customize" }; -static constexpr QQmlJS::LoggerWarningId quickAnchorCombinations { "Quick.anchor-combinations" }; -static constexpr QQmlJS::LoggerWarningId quickUnexpectedVarType { "Quick.unexpected-var-type" }; -static constexpr QQmlJS::LoggerWarningId quickPropertyChangesParsed { "Quick.property-changes-parsed" }; -static constexpr QQmlJS::LoggerWarningId quickControlsAttachedPropertyReuse { "Quick.controls-attached-property-reuse" }; -static constexpr QQmlJS::LoggerWarningId quickAttachedPropertyReuse { "Quick.attached-property-reuse" }; +static constexpr QQmlSA::LoggerWarningId quickLayoutPositioning { "Quick.layout-positioning" }; +static constexpr QQmlSA::LoggerWarningId quickAttachedPropertyType { "Quick.attached-property-type" }; +static constexpr QQmlSA::LoggerWarningId quickControlsNativeCustomize { "Quick.controls-native-customize" }; +static constexpr QQmlSA::LoggerWarningId quickAnchorCombinations { "Quick.anchor-combinations" }; +static constexpr QQmlSA::LoggerWarningId quickUnexpectedVarType { "Quick.unexpected-var-type" }; +static constexpr QQmlSA::LoggerWarningId quickPropertyChangesParsed { "Quick.property-changes-parsed" }; +static constexpr QQmlSA::LoggerWarningId quickControlsAttachedPropertyReuse { "Quick.controls-attached-property-reuse" }; +static constexpr QQmlSA::LoggerWarningId quickAttachedPropertyReuse { "Quick.attached-property-reuse" }; ForbiddenChildrenPropertyValidatorPass::ForbiddenChildrenPropertyValidatorPass( QQmlSA::PassManager *manager) @@ -586,7 +586,7 @@ void AttachedPropertyReuse::onWrite(const QQmlSA::Element &element, const QStrin void QmlLintQuickPlugin::registerPasses(QQmlSA::PassManager *manager, const QQmlSA::Element &rootElement) { - const QQmlJS::LoggerWarningId attachedReuseCategory = [manager]() { + const QQmlSA::LoggerWarningId attachedReuseCategory = [manager]() { if (manager->isCategoryEnabled(quickAttachedPropertyReuse)) return quickAttachedPropertyReuse; if (manager->isCategoryEnabled(qmlAttachedPropertyReuse)) diff --git a/src/plugins/qmllint/quick/quicklintplugin.h b/src/plugins/qmllint/quick/quicklintplugin.h index 6bff7dac9e..bdec509976 100644 --- a/src/plugins/qmllint/quick/quicklintplugin.h +++ b/src/plugins/qmllint/quick/quicklintplugin.h @@ -160,7 +160,7 @@ public: RestrictToControls }; - AttachedPropertyReuse(QQmlSA::PassManager *manager, QQmlJS::LoggerWarningId category) + AttachedPropertyReuse(QQmlSA::PassManager *manager, QQmlSA::LoggerWarningId category) : QQmlSA::PropertyPass(manager), category(category) {} @@ -177,7 +177,7 @@ private: }; QMultiHash<QQmlSA::Element, ElementAndLocation> usedAttachedTypes; - QQmlJS::LoggerWarningId category; + QQmlSA::LoggerWarningId category; }; QT_END_NAMESPACE diff --git a/src/qmlcompiler/qqmljslogger.cpp b/src/qmlcompiler/qqmljslogger.cpp index 07df647490..7bf686018d 100644 --- a/src/qmlcompiler/qqmljslogger.cpp +++ b/src/qmlcompiler/qqmljslogger.cpp @@ -25,42 +25,42 @@ QT_BEGIN_NAMESPACE using namespace Qt::StringLiterals; -const QQmlJS::LoggerWarningId qmlRequired{ "required" }; -const QQmlJS::LoggerWarningId qmlAliasCycle{ "alias-cycle" }; -const QQmlJS::LoggerWarningId qmlUnresolvedAlias{ "unresolved-alias" }; -const QQmlJS::LoggerWarningId qmlImport{ "import" }; -const QQmlJS::LoggerWarningId qmlRecursionDepthErrors{ "recursion-depth-errors" }; -const QQmlJS::LoggerWarningId qmlWith{ "with" }; -const QQmlJS::LoggerWarningId qmlInheritanceCycle{ "inheritance-cycle" }; -const QQmlJS::LoggerWarningId qmlDeprecated{ "deprecated" }; -const QQmlJS::LoggerWarningId qmlSignalParameters{ "signal-handler-parameters" }; -const QQmlJS::LoggerWarningId qmlMissingType{ "missing-type" }; -const QQmlJS::LoggerWarningId qmlUnresolvedType{ "unresolved-type" }; -const QQmlJS::LoggerWarningId qmlRestrictedType{ "restricted-type" }; -const QQmlJS::LoggerWarningId qmlPrefixedImportType{ "prefixed-import-type" }; -const QQmlJS::LoggerWarningId qmlIncompatibleType{ "incompatible-type" }; -const QQmlJS::LoggerWarningId qmlMissingProperty{ "missing-property" }; -const QQmlJS::LoggerWarningId qmlNonListProperty{ "non-list-property" }; -const QQmlJS::LoggerWarningId qmlReadOnlyProperty{ "read-only-property" }; -const QQmlJS::LoggerWarningId qmlDuplicatePropertyBinding{ "duplicate-property-binding" }; -const QQmlJS::LoggerWarningId qmlDuplicatedName{ "duplicated-name" }; -const QQmlJS::LoggerWarningId qmlDeferredPropertyId{ "deferred-property-id" }; -const QQmlJS::LoggerWarningId qmlUnqualified{ "unqualified" }; -const QQmlJS::LoggerWarningId qmlUnusedImports{ "unused-imports" }; -const QQmlJS::LoggerWarningId qmlMultilineStrings{ "multiline-strings" }; -const QQmlJS::LoggerWarningId qmlSyntax{ "syntax" }; -const QQmlJS::LoggerWarningId qmlSyntaxIdQuotation{ "syntax.id-quotation" }; -const QQmlJS::LoggerWarningId qmlSyntaxDuplicateIds{ "syntax.duplicate-ids" }; -const QQmlJS::LoggerWarningId qmlCompiler{ "compiler" }; -const QQmlJS::LoggerWarningId qmlAttachedPropertyReuse{ "attached-property-reuse" }; -const QQmlJS::LoggerWarningId qmlPlugin{ "plugin" }; -const QQmlJS::LoggerWarningId qmlVarUsedBeforeDeclaration{ "var-used-before-declaration" }; -const QQmlJS::LoggerWarningId qmlInvalidLintDirective{ "invalid-lint-directive" }; -const QQmlJS::LoggerWarningId qmlUseProperFunction{ "use-proper-function" }; -const QQmlJS::LoggerWarningId qmlAccessSingleton{ "access-singleton-via-object" }; -const QQmlJS::LoggerWarningId qmlTopLevelComponent{ "top-level-component" }; -const QQmlJS::LoggerWarningId qmlUncreatableType{ "uncreatable-type" }; -const QQmlJS::LoggerWarningId qmlMissingEnumEntry{ "missing-enum-entry" }; +const QQmlSA::LoggerWarningId qmlRequired{ "required" }; +const QQmlSA::LoggerWarningId qmlAliasCycle{ "alias-cycle" }; +const QQmlSA::LoggerWarningId qmlUnresolvedAlias{ "unresolved-alias" }; +const QQmlSA::LoggerWarningId qmlImport{ "import" }; +const QQmlSA::LoggerWarningId qmlRecursionDepthErrors{ "recursion-depth-errors" }; +const QQmlSA::LoggerWarningId qmlWith{ "with" }; +const QQmlSA::LoggerWarningId qmlInheritanceCycle{ "inheritance-cycle" }; +const QQmlSA::LoggerWarningId qmlDeprecated{ "deprecated" }; +const QQmlSA::LoggerWarningId qmlSignalParameters{ "signal-handler-parameters" }; +const QQmlSA::LoggerWarningId qmlMissingType{ "missing-type" }; +const QQmlSA::LoggerWarningId qmlUnresolvedType{ "unresolved-type" }; +const QQmlSA::LoggerWarningId qmlRestrictedType{ "restricted-type" }; +const QQmlSA::LoggerWarningId qmlPrefixedImportType{ "prefixed-import-type" }; +const QQmlSA::LoggerWarningId qmlIncompatibleType{ "incompatible-type" }; +const QQmlSA::LoggerWarningId qmlMissingProperty{ "missing-property" }; +const QQmlSA::LoggerWarningId qmlNonListProperty{ "non-list-property" }; +const QQmlSA::LoggerWarningId qmlReadOnlyProperty{ "read-only-property" }; +const QQmlSA::LoggerWarningId qmlDuplicatePropertyBinding{ "duplicate-property-binding" }; +const QQmlSA::LoggerWarningId qmlDuplicatedName{ "duplicated-name" }; +const QQmlSA::LoggerWarningId qmlDeferredPropertyId{ "deferred-property-id" }; +const QQmlSA::LoggerWarningId qmlUnqualified{ "unqualified" }; +const QQmlSA::LoggerWarningId qmlUnusedImports{ "unused-imports" }; +const QQmlSA::LoggerWarningId qmlMultilineStrings{ "multiline-strings" }; +const QQmlSA::LoggerWarningId qmlSyntax{ "syntax" }; +const QQmlSA::LoggerWarningId qmlSyntaxIdQuotation{ "syntax.id-quotation" }; +const QQmlSA::LoggerWarningId qmlSyntaxDuplicateIds{ "syntax.duplicate-ids" }; +const QQmlSA::LoggerWarningId qmlCompiler{ "compiler" }; +const QQmlSA::LoggerWarningId qmlAttachedPropertyReuse{ "attached-property-reuse" }; +const QQmlSA::LoggerWarningId qmlPlugin{ "plugin" }; +const QQmlSA::LoggerWarningId qmlVarUsedBeforeDeclaration{ "var-used-before-declaration" }; +const QQmlSA::LoggerWarningId qmlInvalidLintDirective{ "invalid-lint-directive" }; +const QQmlSA::LoggerWarningId qmlUseProperFunction{ "use-proper-function" }; +const QQmlSA::LoggerWarningId qmlAccessSingleton{ "access-singleton-via-object" }; +const QQmlSA::LoggerWarningId qmlTopLevelComponent{ "top-level-component" }; +const QQmlSA::LoggerWarningId qmlUncreatableType{ "uncreatable-type" }; +const QQmlSA::LoggerWarningId qmlMissingEnumEntry{ "missing-enum-entry" }; QQmlJSLogger::QQmlJSLogger() { diff --git a/src/qmlcompiler/qqmljsloggingutils.cpp b/src/qmlcompiler/qqmljsloggingutils.cpp index 2ad26cab73..caa2438ae5 100644 --- a/src/qmlcompiler/qqmljsloggingutils.cpp +++ b/src/qmlcompiler/qqmljsloggingutils.cpp @@ -123,6 +123,14 @@ LoggerCategoryPrivate *LoggerCategoryPrivate::get(LoggerCategory *loggerCategory return loggerCategory->d_func(); } +/*! + \class QQmlSA::LoggerWarningId + \inmodule QtQmlCompiler + + \brief A wrapper around a string literal to uniquely identify + warning categories in the \c{QQmlSA} framework. +*/ + } // namespace QQmlJS QT_END_NAMESPACE diff --git a/src/qmlcompiler/qqmljsloggingutils.h b/src/qmlcompiler/qqmljsloggingutils.h index 71af0e2d89..5d48cd379b 100644 --- a/src/qmlcompiler/qqmljsloggingutils.h +++ b/src/qmlcompiler/qqmljsloggingutils.h @@ -16,7 +16,7 @@ namespace QQmlSA { class SourceLocation; } -namespace QQmlJS { +namespace QQmlSA { class Q_QMLCOMPILER_EXPORT LoggerWarningId { @@ -38,44 +38,44 @@ private: const QAnyStringView m_name; }; -} // namespace QQmlJS +} // namespace QQmlSA -extern const Q_QMLCOMPILER_EXPORT QQmlJS::LoggerWarningId qmlRequired; -extern const Q_QMLCOMPILER_EXPORT QQmlJS::LoggerWarningId qmlUnresolvedAlias; -extern const Q_QMLCOMPILER_EXPORT QQmlJS::LoggerWarningId qmlAliasCycle; -extern const Q_QMLCOMPILER_EXPORT QQmlJS::LoggerWarningId qmlImport; -extern const Q_QMLCOMPILER_EXPORT QQmlJS::LoggerWarningId qmlRecursionDepthErrors; -extern const Q_QMLCOMPILER_EXPORT QQmlJS::LoggerWarningId qmlWith; -extern const Q_QMLCOMPILER_EXPORT QQmlJS::LoggerWarningId qmlInheritanceCycle; -extern const Q_QMLCOMPILER_EXPORT QQmlJS::LoggerWarningId qmlDeprecated; -extern const Q_QMLCOMPILER_EXPORT QQmlJS::LoggerWarningId qmlSignalParameters; -extern const Q_QMLCOMPILER_EXPORT QQmlJS::LoggerWarningId qmlMissingType; -extern const Q_QMLCOMPILER_EXPORT QQmlJS::LoggerWarningId qmlUnresolvedType; -extern const Q_QMLCOMPILER_EXPORT QQmlJS::LoggerWarningId qmlIncompatibleType; -extern const Q_QMLCOMPILER_EXPORT QQmlJS::LoggerWarningId qmlMissingProperty; -extern const Q_QMLCOMPILER_EXPORT QQmlJS::LoggerWarningId qmlRestrictedType; -extern const Q_QMLCOMPILER_EXPORT QQmlJS::LoggerWarningId qmlPrefixedImportType; -extern const Q_QMLCOMPILER_EXPORT QQmlJS::LoggerWarningId qmlNonListProperty; -extern const Q_QMLCOMPILER_EXPORT QQmlJS::LoggerWarningId qmlReadOnlyProperty; -extern const Q_QMLCOMPILER_EXPORT QQmlJS::LoggerWarningId qmlDuplicatePropertyBinding; -extern const Q_QMLCOMPILER_EXPORT QQmlJS::LoggerWarningId qmlDuplicatedName; -extern const Q_QMLCOMPILER_EXPORT QQmlJS::LoggerWarningId qmlDeferredPropertyId; -extern const Q_QMLCOMPILER_EXPORT QQmlJS::LoggerWarningId qmlUnqualified; -extern const Q_QMLCOMPILER_EXPORT QQmlJS::LoggerWarningId qmlUnusedImports; -extern const Q_QMLCOMPILER_EXPORT QQmlJS::LoggerWarningId qmlMultilineStrings; -extern const Q_QMLCOMPILER_EXPORT QQmlJS::LoggerWarningId qmlSyntax; -extern const Q_QMLCOMPILER_EXPORT QQmlJS::LoggerWarningId qmlSyntaxIdQuotation; -extern const Q_QMLCOMPILER_EXPORT QQmlJS::LoggerWarningId qmlSyntaxDuplicateIds; -extern const Q_QMLCOMPILER_EXPORT QQmlJS::LoggerWarningId qmlCompiler; -extern const Q_QMLCOMPILER_EXPORT QQmlJS::LoggerWarningId qmlAttachedPropertyReuse; -extern const Q_QMLCOMPILER_EXPORT QQmlJS::LoggerWarningId qmlPlugin; -extern const Q_QMLCOMPILER_EXPORT QQmlJS::LoggerWarningId qmlVarUsedBeforeDeclaration; -extern const Q_QMLCOMPILER_EXPORT QQmlJS::LoggerWarningId qmlInvalidLintDirective; -extern const Q_QMLCOMPILER_EXPORT QQmlJS::LoggerWarningId qmlUseProperFunction; -extern const Q_QMLCOMPILER_EXPORT QQmlJS::LoggerWarningId qmlAccessSingleton; -extern const Q_QMLCOMPILER_EXPORT QQmlJS::LoggerWarningId qmlTopLevelComponent; -extern const Q_QMLCOMPILER_EXPORT QQmlJS::LoggerWarningId qmlUncreatableType; -extern const Q_QMLCOMPILER_EXPORT QQmlJS::LoggerWarningId qmlMissingEnumEntry; +extern const Q_QMLCOMPILER_EXPORT QQmlSA::LoggerWarningId qmlRequired; +extern const Q_QMLCOMPILER_EXPORT QQmlSA::LoggerWarningId qmlUnresolvedAlias; +extern const Q_QMLCOMPILER_EXPORT QQmlSA::LoggerWarningId qmlAliasCycle; +extern const Q_QMLCOMPILER_EXPORT QQmlSA::LoggerWarningId qmlImport; +extern const Q_QMLCOMPILER_EXPORT QQmlSA::LoggerWarningId qmlRecursionDepthErrors; +extern const Q_QMLCOMPILER_EXPORT QQmlSA::LoggerWarningId qmlWith; +extern const Q_QMLCOMPILER_EXPORT QQmlSA::LoggerWarningId qmlInheritanceCycle; +extern const Q_QMLCOMPILER_EXPORT QQmlSA::LoggerWarningId qmlDeprecated; +extern const Q_QMLCOMPILER_EXPORT QQmlSA::LoggerWarningId qmlSignalParameters; +extern const Q_QMLCOMPILER_EXPORT QQmlSA::LoggerWarningId qmlMissingType; +extern const Q_QMLCOMPILER_EXPORT QQmlSA::LoggerWarningId qmlUnresolvedType; +extern const Q_QMLCOMPILER_EXPORT QQmlSA::LoggerWarningId qmlIncompatibleType; +extern const Q_QMLCOMPILER_EXPORT QQmlSA::LoggerWarningId qmlMissingProperty; +extern const Q_QMLCOMPILER_EXPORT QQmlSA::LoggerWarningId qmlRestrictedType; +extern const Q_QMLCOMPILER_EXPORT QQmlSA::LoggerWarningId qmlPrefixedImportType; +extern const Q_QMLCOMPILER_EXPORT QQmlSA::LoggerWarningId qmlNonListProperty; +extern const Q_QMLCOMPILER_EXPORT QQmlSA::LoggerWarningId qmlReadOnlyProperty; +extern const Q_QMLCOMPILER_EXPORT QQmlSA::LoggerWarningId qmlDuplicatePropertyBinding; +extern const Q_QMLCOMPILER_EXPORT QQmlSA::LoggerWarningId qmlDuplicatedName; +extern const Q_QMLCOMPILER_EXPORT QQmlSA::LoggerWarningId qmlDeferredPropertyId; +extern const Q_QMLCOMPILER_EXPORT QQmlSA::LoggerWarningId qmlUnqualified; +extern const Q_QMLCOMPILER_EXPORT QQmlSA::LoggerWarningId qmlUnusedImports; +extern const Q_QMLCOMPILER_EXPORT QQmlSA::LoggerWarningId qmlMultilineStrings; +extern const Q_QMLCOMPILER_EXPORT QQmlSA::LoggerWarningId qmlSyntax; +extern const Q_QMLCOMPILER_EXPORT QQmlSA::LoggerWarningId qmlSyntaxIdQuotation; +extern const Q_QMLCOMPILER_EXPORT QQmlSA::LoggerWarningId qmlSyntaxDuplicateIds; +extern const Q_QMLCOMPILER_EXPORT QQmlSA::LoggerWarningId qmlCompiler; +extern const Q_QMLCOMPILER_EXPORT QQmlSA::LoggerWarningId qmlAttachedPropertyReuse; +extern const Q_QMLCOMPILER_EXPORT QQmlSA::LoggerWarningId qmlPlugin; +extern const Q_QMLCOMPILER_EXPORT QQmlSA::LoggerWarningId qmlVarUsedBeforeDeclaration; +extern const Q_QMLCOMPILER_EXPORT QQmlSA::LoggerWarningId qmlInvalidLintDirective; +extern const Q_QMLCOMPILER_EXPORT QQmlSA::LoggerWarningId qmlUseProperFunction; +extern const Q_QMLCOMPILER_EXPORT QQmlSA::LoggerWarningId qmlAccessSingleton; +extern const Q_QMLCOMPILER_EXPORT QQmlSA::LoggerWarningId qmlTopLevelComponent; +extern const Q_QMLCOMPILER_EXPORT QQmlSA::LoggerWarningId qmlUncreatableType; +extern const Q_QMLCOMPILER_EXPORT QQmlSA::LoggerWarningId qmlMissingEnumEntry; QT_END_NAMESPACE diff --git a/src/qmlcompiler/qqmljsloggingutils_p.h b/src/qmlcompiler/qqmljsloggingutils_p.h index 0cd3d87e41..11196c13ac 100644 --- a/src/qmlcompiler/qqmljsloggingutils_p.h +++ b/src/qmlcompiler/qqmljsloggingutils_p.h @@ -24,6 +24,8 @@ QT_BEGIN_NAMESPACE namespace QQmlJS { +using LoggerWarningId = QQmlSA::LoggerWarningId; + class LoggerCategoryPrivate; class Q_QMLCOMPILER_EXPORT LoggerCategory diff --git a/src/qmlcompiler/qqmlsa.cpp b/src/qmlcompiler/qqmlsa.cpp index 3d71737e43..e3c1baf9ef 100644 --- a/src/qmlcompiler/qqmlsa.cpp +++ b/src/qmlcompiler/qqmlsa.cpp @@ -845,7 +845,7 @@ GenericPass::GenericPass(PassManager *manager) /*! Emits a warning message \a diagnostic about an issue of type \a id. */ -void GenericPass::emitWarning(QAnyStringView diagnostic, QQmlJS::LoggerWarningId id) +void GenericPass::emitWarning(QAnyStringView diagnostic, LoggerWarningId id) { emitWarning(diagnostic, id, QQmlSA::SourceLocation{}); } @@ -854,7 +854,7 @@ void GenericPass::emitWarning(QAnyStringView diagnostic, QQmlJS::LoggerWarningId Emits warning message \a diagnostic about an issue of type \a id located at \a srcLocation. */ -void GenericPass::emitWarning(QAnyStringView diagnostic, QQmlJS::LoggerWarningId id, +void GenericPass::emitWarning(QAnyStringView diagnostic, LoggerWarningId id, QQmlSA::SourceLocation srcLocation) { Q_D(const GenericPass); @@ -868,7 +868,7 @@ void GenericPass::emitWarning(QAnyStringView diagnostic, QQmlJS::LoggerWarningId Emits a warning message \a diagnostic about an issue of type \a id located at \a srcLocation and with suggested fix \a fix. */ -void GenericPass::emitWarning(QAnyStringView diagnostic, QQmlJS::LoggerWarningId id, +void GenericPass::emitWarning(QAnyStringView diagnostic, LoggerWarningId id, QQmlSA::SourceLocation srcLocation, const QQmlSA::FixSuggestion &fix) { Q_D(const GenericPass); @@ -1240,7 +1240,7 @@ bool PassManager::hasImportedModule(QAnyStringView module) const /*! Returns \c true if warnings of \a category are enabled, \c false otherwise. */ -bool PassManager::isCategoryEnabled(QQmlJS::LoggerWarningId category) const +bool PassManager::isCategoryEnabled(LoggerWarningId category) const { return !PassManagerPrivate::visitor(*this)->logger()->isCategoryIgnored(category); } diff --git a/src/qmlcompiler/qqmlsa.h b/src/qmlcompiler/qqmlsa.h index 5b09d31358..0aa44430a1 100644 --- a/src/qmlcompiler/qqmlsa.h +++ b/src/qmlcompiler/qqmlsa.h @@ -285,10 +285,10 @@ public: GenericPass(PassManager *manager); virtual ~GenericPass(); - void emitWarning(QAnyStringView diagnostic, QQmlJS::LoggerWarningId id); - void emitWarning(QAnyStringView diagnostic, QQmlJS::LoggerWarningId id, + void emitWarning(QAnyStringView diagnostic, LoggerWarningId id); + void emitWarning(QAnyStringView diagnostic, LoggerWarningId id, QQmlSA::SourceLocation srcLocation); - void emitWarning(QAnyStringView diagnostic, QQmlJS::LoggerWarningId id, + void emitWarning(QAnyStringView diagnostic, LoggerWarningId id, QQmlSA::SourceLocation srcLocation, const QQmlSA::FixSuggestion &fix); Element resolveTypeInFileScope(QAnyStringView typeName); @@ -325,7 +325,7 @@ public: bool hasImportedModule(QAnyStringView name) const; - bool isCategoryEnabled(QQmlJS::LoggerWarningId category) const; + bool isCategoryEnabled(LoggerWarningId category) const; std::vector<std::shared_ptr<ElementPass>> elementPasses() const; std::multimap<QString, PropertyPassInfo> propertyPasses() const; diff --git a/tests/auto/qml/qmllint/lintplugin.cpp b/tests/auto/qml/qmllint/lintplugin.cpp index 4666cef0bc..730d6a9ea9 100644 --- a/tests/auto/qml/qmllint/lintplugin.cpp +++ b/tests/auto/qml/qmllint/lintplugin.cpp @@ -5,7 +5,7 @@ using namespace Qt::StringLiterals; -static constexpr QQmlJS::LoggerWarningId plugin{ "testPlugin.test" }; +static constexpr QQmlSA::LoggerWarningId plugin{ "testPlugin.test" }; class ElementTest : public QQmlSA::ElementPass { |
