Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qqmlsasourcelocation_p.h
Go to the documentation of this file.
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// Qt-Security score:significant
4
5#ifndef QQMLSASOURCELOCATION_P_H
6#define QQMLSASOURCELOCATION_P_H
7
8//
9// W A R N I N G
10// -------------
11//
12// This file is not part of the Qt API. It exists purely as an
13// implementation detail. This header file may change from version to
14// version without notice, or even be removed.
15//
16// We mean it.
17
19
20#include <QtQml/private/qqmljssourcelocation_p.h>
21
23
24namespace QQmlSA {
25
27{
28public:
29 static const QQmlJS::SourceLocation &
30 sourceLocation(const QQmlSA::SourceLocation &sourceLocation)
31 {
32 return reinterpret_cast<const QQmlJS::SourceLocation &>(sourceLocation.m_data);
33 }
34
37 {
38 QQmlSA::SourceLocation saLocation;
39 auto &internal = reinterpret_cast<QQmlJS::SourceLocation &>(saLocation.m_data);
40 internal = jsLocation;
41 return saLocation;
42 }
43
45 {
46 return SourceLocation::sizeofSourceLocation;
47 }
48};
49
50} // namespace QQmlSA
51
52QT_END_NAMESPACE
53
54#endif // QQMLSASOURCELOCATION_P_H
static const QQmlJS::SourceLocation & sourceLocation(const QQmlSA::SourceLocation &sourceLocation)
static QQmlSA::SourceLocation createQQmlSASourceLocation(const QQmlJS::SourceLocation &jsLocation)
static constexpr qsizetype sizeOfSourceLocation()
\inmodule QtQmlCompiler
\inmodule QtQmlCompiler