1 | // Copyright (C) 2023 The Qt Company Ltd. |
---|---|
2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only |
3 | |
4 | #ifndef QQMLDOM_UTILS_P_H |
5 | #define QQMLDOM_UTILS_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 | |
18 | #include <QtCore/qglobal.h> |
19 | #include "qqmldom_fwd_p.h" |
20 | #include "qqmldomconstants_p.h" |
21 | #include <QtQml/private/qqmljssourcelocation_p.h> |
22 | #include <QtCore/qstringlist.h> |
23 | #include <QtCore/qloggingcategory.h> |
24 | #include <QtCore/qcborvalue.h> |
25 | |
26 | QT_BEGIN_NAMESPACE |
27 | |
28 | Q_DECLARE_LOGGING_CATEGORY(QQmlJSDomImporting); |
29 | |
30 | template<class... Ts> |
31 | struct qOverloadedVisitor : Ts... |
32 | { |
33 | using Ts::operator()...; |
34 | }; |
35 | template<class... Ts> |
36 | qOverloadedVisitor(Ts...) -> qOverloadedVisitor<Ts...>; |
37 | |
38 | namespace QQmlJS { |
39 | namespace Dom { |
40 | |
41 | QString fileLocationRegionName(FileLocationRegion region); |
42 | FileLocationRegion fileLocationRegionValue(QStringView region); |
43 | |
44 | QCborValue sourceLocationToQCborValue(SourceLocation loc); |
45 | |
46 | } // namespace Dom |
47 | }; // namespace QQmlJS |
48 | |
49 | QT_END_NAMESPACE |
50 | |
51 | #endif // QQMLDOM_UTILS_P_H |
52 |