| 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 qmlRequired; | 
|---|
| 44 | extern const Q_QMLCOMPILER_EXPORT QQmlSA::LoggerWarningId qmlUnresolvedAlias; | 
|---|
| 45 | extern const Q_QMLCOMPILER_EXPORT QQmlSA::LoggerWarningId qmlAliasCycle; | 
|---|
| 46 | extern const Q_QMLCOMPILER_EXPORT QQmlSA::LoggerWarningId qmlImport; | 
|---|
| 47 | extern const Q_QMLCOMPILER_EXPORT QQmlSA::LoggerWarningId qmlRecursionDepthErrors; | 
|---|
| 48 | extern const Q_QMLCOMPILER_EXPORT QQmlSA::LoggerWarningId qmlWith; | 
|---|
| 49 | extern const Q_QMLCOMPILER_EXPORT QQmlSA::LoggerWarningId qmlInheritanceCycle; | 
|---|
| 50 | extern const Q_QMLCOMPILER_EXPORT QQmlSA::LoggerWarningId qmlDeprecated; | 
|---|
| 51 | extern const Q_QMLCOMPILER_EXPORT QQmlSA::LoggerWarningId qmlSignalParameters; | 
|---|
| 52 | extern const Q_QMLCOMPILER_EXPORT QQmlSA::LoggerWarningId qmlMissingType; | 
|---|
| 53 | extern const Q_QMLCOMPILER_EXPORT QQmlSA::LoggerWarningId qmlUnresolvedType; | 
|---|
| 54 | extern const Q_QMLCOMPILER_EXPORT QQmlSA::LoggerWarningId qmlIncompatibleType; | 
|---|
| 55 | extern const Q_QMLCOMPILER_EXPORT QQmlSA::LoggerWarningId qmlMissingProperty; | 
|---|
| 56 | extern const Q_QMLCOMPILER_EXPORT QQmlSA::LoggerWarningId qmlRestrictedType; | 
|---|
| 57 | extern const Q_QMLCOMPILER_EXPORT QQmlSA::LoggerWarningId qmlPrefixedImportType; | 
|---|
| 58 | extern const Q_QMLCOMPILER_EXPORT QQmlSA::LoggerWarningId qmlNonListProperty; | 
|---|
| 59 | extern const Q_QMLCOMPILER_EXPORT QQmlSA::LoggerWarningId qmlReadOnlyProperty; | 
|---|
| 60 | extern const Q_QMLCOMPILER_EXPORT QQmlSA::LoggerWarningId qmlDuplicatePropertyBinding; | 
|---|
| 61 | extern const Q_QMLCOMPILER_EXPORT QQmlSA::LoggerWarningId qmlDuplicatedName; | 
|---|
| 62 | extern const Q_QMLCOMPILER_EXPORT QQmlSA::LoggerWarningId qmlDeferredPropertyId; | 
|---|
| 63 | extern const Q_QMLCOMPILER_EXPORT QQmlSA::LoggerWarningId qmlUnqualified; | 
|---|
| 64 | extern const Q_QMLCOMPILER_EXPORT QQmlSA::LoggerWarningId qmlUnusedImports; | 
|---|
| 65 | extern const Q_QMLCOMPILER_EXPORT QQmlSA::LoggerWarningId qmlMultilineStrings; | 
|---|
| 66 | extern const Q_QMLCOMPILER_EXPORT QQmlSA::LoggerWarningId qmlSyntax; | 
|---|
| 67 | extern const Q_QMLCOMPILER_EXPORT QQmlSA::LoggerWarningId qmlSyntaxIdQuotation; | 
|---|
| 68 | extern const Q_QMLCOMPILER_EXPORT QQmlSA::LoggerWarningId qmlSyntaxDuplicateIds; | 
|---|
| 69 | extern const Q_QMLCOMPILER_EXPORT QQmlSA::LoggerWarningId qmlCompiler; | 
|---|
| 70 | extern const Q_QMLCOMPILER_EXPORT QQmlSA::LoggerWarningId qmlAttachedPropertyReuse; | 
|---|
| 71 | extern const Q_QMLCOMPILER_EXPORT QQmlSA::LoggerWarningId qmlPlugin; | 
|---|
| 72 | extern const Q_QMLCOMPILER_EXPORT QQmlSA::LoggerWarningId qmlVarUsedBeforeDeclaration; | 
|---|
| 73 | extern const Q_QMLCOMPILER_EXPORT QQmlSA::LoggerWarningId qmlInvalidLintDirective; | 
|---|
| 74 | extern const Q_QMLCOMPILER_EXPORT QQmlSA::LoggerWarningId qmlUseProperFunction; | 
|---|
| 75 | extern const Q_QMLCOMPILER_EXPORT QQmlSA::LoggerWarningId qmlAccessSingleton; | 
|---|
| 76 | extern const Q_QMLCOMPILER_EXPORT QQmlSA::LoggerWarningId qmlTopLevelComponent; | 
|---|
| 77 | extern const Q_QMLCOMPILER_EXPORT QQmlSA::LoggerWarningId qmlUncreatableType; | 
|---|
| 78 | extern const Q_QMLCOMPILER_EXPORT QQmlSA::LoggerWarningId qmlMissingEnumEntry; | 
|---|
| 79 |  | 
|---|
| 80 | QT_END_NAMESPACE | 
|---|
| 81 |  | 
|---|
| 82 | #endif // QQMLJSLOGGER_H | 
|---|
| 83 |  | 
|---|