| 1 | // Copyright (C) 2025 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 QQMLJSCONTEXTPROPERTIES_P_H |
| 5 | #define QQMLJSCONTEXTPROPERTIES_P_H |
| 6 | |
| 7 | // |
| 8 | // W A R N I N G |
| 9 | // ------------- |
| 10 | // |
| 11 | // This file is not part of the Qt API. It exists purely as an |
| 12 | // implementation detail. This header file may change from version to |
| 13 | // version without notice, or even be removed. |
| 14 | // |
| 15 | // We mean it. |
| 16 | |
| 17 | #include <qtqmlcompilerexports.h> |
| 18 | |
| 19 | #include <QtCore/qstring.h> |
| 20 | #include <QtCore/qhash.h> |
| 21 | #include <QtCore/qlist.h> |
| 22 | |
| 23 | #include <QtQml/private/qqmljssourcelocation_p.h> |
| 24 | |
| 25 | #include "qqmljsloggingutils_p.h" |
| 26 | |
| 27 | QT_BEGIN_NAMESPACE |
| 28 | |
| 29 | namespace QQmlJS { |
| 30 | class LoggerCategory; |
| 31 | |
| 32 | struct ContextProperty; |
| 33 | using ContextProperties = QHash<QString, QList<ContextProperty>>; |
| 34 | |
| 35 | struct Q_QMLCOMPILER_EXPORT ContextProperty |
| 36 | { |
| 37 | QString filename; |
| 38 | QQmlJS::SourceLocation location; |
| 39 | |
| 40 | static ContextProperties collectAllFrom(const QList<QString> &rootUrls); |
| 41 | static bool isWarningEnabled(const QList<QQmlJS::LoggerCategory> &categories); |
| 42 | }; |
| 43 | |
| 44 | } // namespace QQmlJS |
| 45 | |
| 46 | QT_END_NAMESPACE |
| 47 | |
| 48 | #endif // QQMLJSCONTEXTPROPERTIES_P_H |
| 49 | |