| 1 | // Copyright (C) 2023 The Qt Company Ltd. |
| 2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 |
| 3 | |
| 4 | #ifndef QQMLJSLOGGER_H |
| 5 | #define QQMLJSLOGGER_H |
| 6 | |
| 7 | #include <QtCore/qanystringview.h> |
| 8 | #include <QtQmlCompiler/qtqmlcompilerexports.h> |
| 9 | |
| 10 | QT_BEGIN_NAMESPACE |
| 11 | |
| 12 | class QQmlJSLoggerPrivate; |
| 13 | class QQmlJSScope; |
| 14 | |
| 15 | namespace QQmlSA { |
| 16 | class SourceLocation; |
| 17 | } |
| 18 | |
| 19 | namespace QQmlSA { |
| 20 | |
| 21 | class Q_QMLCOMPILER_EXPORT LoggerWarningId |
| 22 | { |
| 23 | public: |
| 24 | constexpr LoggerWarningId(QAnyStringView name) : m_name(name) { } |
| 25 | |
| 26 | QAnyStringView name() const { return m_name; } |
| 27 | |
| 28 | private: |
| 29 | friend bool operator==(const LoggerWarningId &a, const LoggerWarningId &b) |
| 30 | { |
| 31 | return a.m_name == b.m_name; |
| 32 | } |
| 33 | |
| 34 | friend bool operator!=(const LoggerWarningId &a, const LoggerWarningId &b) |
| 35 | { |
| 36 | return a.m_name != b.m_name; |
| 37 | } |
| 38 | const QAnyStringView m_name; |
| 39 | }; |
| 40 | |
| 41 | } // namespace QQmlSA |
| 42 | |
| 43 | extern const Q_QMLCOMPILER_EXPORT QQmlSA::LoggerWarningId qmlAccessSingleton; |
| 44 | extern const Q_QMLCOMPILER_EXPORT QQmlSA::LoggerWarningId qmlAliasCycle; |
| 45 | extern const Q_QMLCOMPILER_EXPORT QQmlSA::LoggerWarningId qmlAssignmentInCondition; |
| 46 | extern const Q_QMLCOMPILER_EXPORT QQmlSA::LoggerWarningId qmlAttachedPropertyReuse; |
| 47 | extern const Q_QMLCOMPILER_EXPORT QQmlSA::LoggerWarningId qmlComma; |
| 48 | extern const Q_QMLCOMPILER_EXPORT QQmlSA::LoggerWarningId qmlCompiler; |
| 49 | extern const Q_QMLCOMPILER_EXPORT QQmlSA::LoggerWarningId qmlComponentChildrenCount; |
| 50 | extern const Q_QMLCOMPILER_EXPORT QQmlSA::LoggerWarningId qmlConfusingExpressionStatement; |
| 51 | extern const Q_QMLCOMPILER_EXPORT QQmlSA::LoggerWarningId qmlConfusingMinuses; |
| 52 | extern const Q_QMLCOMPILER_EXPORT QQmlSA::LoggerWarningId qmlConfusingPluses; |
| 53 | extern const Q_QMLCOMPILER_EXPORT QQmlSA::LoggerWarningId qmlContextProperties; |
| 54 | extern const Q_QMLCOMPILER_EXPORT QQmlSA::LoggerWarningId qmlDeferredPropertyId; |
| 55 | extern const Q_QMLCOMPILER_EXPORT QQmlSA::LoggerWarningId qmlDeprecated; |
| 56 | extern const Q_QMLCOMPILER_EXPORT QQmlSA::LoggerWarningId qmlDuplicateEnumEntries; |
| 57 | extern const Q_QMLCOMPILER_EXPORT QQmlSA::LoggerWarningId qmlDuplicateImport; |
| 58 | extern const Q_QMLCOMPILER_EXPORT QQmlSA::LoggerWarningId qmlDuplicateInlineComponent; |
| 59 | extern const Q_QMLCOMPILER_EXPORT QQmlSA::LoggerWarningId qmlDuplicatePropertyBinding; |
| 60 | extern const Q_QMLCOMPILER_EXPORT QQmlSA::LoggerWarningId qmlDuplicatedName; |
| 61 | extern const Q_QMLCOMPILER_EXPORT QQmlSA::LoggerWarningId qmlEnumEntryMatchesEnum; |
| 62 | extern const Q_QMLCOMPILER_EXPORT QQmlSA::LoggerWarningId qmlEnumsAreNotTypes; |
| 63 | extern const Q_QMLCOMPILER_EXPORT QQmlSA::LoggerWarningId qmlEqualityTypeCoercion; |
| 64 | extern const Q_QMLCOMPILER_EXPORT QQmlSA::LoggerWarningId qmlEval; |
| 65 | extern const Q_QMLCOMPILER_EXPORT QQmlSA::LoggerWarningId qmlFunctionUsedBeforeDeclaration; |
| 66 | extern const Q_QMLCOMPILER_EXPORT QQmlSA::LoggerWarningId qmlImport; |
| 67 | extern const Q_QMLCOMPILER_EXPORT QQmlSA::LoggerWarningId qmlImportFileSelector; |
| 68 | extern const Q_QMLCOMPILER_EXPORT QQmlSA::LoggerWarningId qmlIncompatibleType; |
| 69 | extern const Q_QMLCOMPILER_EXPORT QQmlSA::LoggerWarningId qmlInheritanceCycle; |
| 70 | extern const Q_QMLCOMPILER_EXPORT QQmlSA::LoggerWarningId qmlInvalidLintDirective; |
| 71 | extern const Q_QMLCOMPILER_EXPORT QQmlSA::LoggerWarningId qmlLiteralConstructor; |
| 72 | extern const Q_QMLCOMPILER_EXPORT QQmlSA::LoggerWarningId qmlMissingEnumEntry; |
| 73 | extern const Q_QMLCOMPILER_EXPORT QQmlSA::LoggerWarningId qmlMissingProperty; |
| 74 | extern const Q_QMLCOMPILER_EXPORT QQmlSA::LoggerWarningId qmlMissingType; |
| 75 | extern const Q_QMLCOMPILER_EXPORT QQmlSA::LoggerWarningId qmlMultilineStrings; |
| 76 | extern const Q_QMLCOMPILER_EXPORT QQmlSA::LoggerWarningId qmlNonListProperty; |
| 77 | extern const Q_QMLCOMPILER_EXPORT QQmlSA::LoggerWarningId qmlNonRootEnums; |
| 78 | extern const Q_QMLCOMPILER_EXPORT QQmlSA::LoggerWarningId qmlPlugin; |
| 79 | extern const Q_QMLCOMPILER_EXPORT QQmlSA::LoggerWarningId qmlPreferNonVarProperties; |
| 80 | extern const Q_QMLCOMPILER_EXPORT QQmlSA::LoggerWarningId qmlPrefixedImportType; |
| 81 | extern const Q_QMLCOMPILER_EXPORT QQmlSA::LoggerWarningId qmlReadOnlyProperty; |
| 82 | extern const Q_QMLCOMPILER_EXPORT QQmlSA::LoggerWarningId qmlRecursionDepthErrors; |
| 83 | extern const Q_QMLCOMPILER_EXPORT QQmlSA::LoggerWarningId qmlRedundantOptionalChaining; |
| 84 | extern const Q_QMLCOMPILER_EXPORT QQmlSA::LoggerWarningId qmlRequired; |
| 85 | extern const Q_QMLCOMPILER_EXPORT QQmlSA::LoggerWarningId qmlRestrictedType; |
| 86 | extern const Q_QMLCOMPILER_EXPORT QQmlSA::LoggerWarningId qmlSignalParameters; |
| 87 | extern const Q_QMLCOMPILER_EXPORT QQmlSA::LoggerWarningId qmlStalePropertyRead; |
| 88 | extern const Q_QMLCOMPILER_EXPORT QQmlSA::LoggerWarningId qmlSyntax; |
| 89 | extern const Q_QMLCOMPILER_EXPORT QQmlSA::LoggerWarningId qmlSyntaxDuplicateIds; |
| 90 | extern const Q_QMLCOMPILER_EXPORT QQmlSA::LoggerWarningId qmlSyntaxIdQuotation; |
| 91 | extern const Q_QMLCOMPILER_EXPORT QQmlSA::LoggerWarningId qmlTopLevelComponent; |
| 92 | extern const Q_QMLCOMPILER_EXPORT QQmlSA::LoggerWarningId qmlTranslationFunctionMismatch; |
| 93 | extern const Q_QMLCOMPILER_EXPORT QQmlSA::LoggerWarningId qmlUncreatableType; |
| 94 | extern const Q_QMLCOMPILER_EXPORT QQmlSA::LoggerWarningId qmlUnintentionalEmptyBlock; |
| 95 | extern const Q_QMLCOMPILER_EXPORT QQmlSA::LoggerWarningId qmlUnqualified; |
| 96 | extern const Q_QMLCOMPILER_EXPORT QQmlSA::LoggerWarningId qmlUnreachableCode; |
| 97 | extern const Q_QMLCOMPILER_EXPORT QQmlSA::LoggerWarningId qmlUnresolvedAlias; |
| 98 | extern const Q_QMLCOMPILER_EXPORT QQmlSA::LoggerWarningId qmlUnresolvedType; |
| 99 | extern const Q_QMLCOMPILER_EXPORT QQmlSA::LoggerWarningId qmlUnterminatedCase; |
| 100 | extern const Q_QMLCOMPILER_EXPORT QQmlSA::LoggerWarningId qmlUnusedImports; |
| 101 | extern const Q_QMLCOMPILER_EXPORT QQmlSA::LoggerWarningId qmlUseProperFunction; |
| 102 | extern const Q_QMLCOMPILER_EXPORT QQmlSA::LoggerWarningId qmlVarUsedBeforeDeclaration; |
| 103 | extern const Q_QMLCOMPILER_EXPORT QQmlSA::LoggerWarningId qmlVoid; |
| 104 | extern const Q_QMLCOMPILER_EXPORT QQmlSA::LoggerWarningId qmlWith; |
| 105 | |
| 106 | QT_END_NAMESPACE |
| 107 | |
| 108 | #endif // QQMLJSLOGGER_H |
| 109 | |