Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
qqmlsasourcelocation.cpp
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
6
8
9using namespace Qt::StringLiterals;
10
11namespace QQmlSA {
12
13static_assert(SourceLocationPrivate::sizeOfSourceLocation() == sizeof(SourceLocation));
14
25
26// explicitly defaulted out-of-line for PIMPL
30
35
43
51
59
67
75
83
89{
90 QQmlSA::SourceLocation saLocation;
91 auto &wrappedLocation = reinterpret_cast<QQmlJS::SourceLocation &>(saLocation.m_data);
92 wrappedLocation =
93 QQmlSA::SourceLocationPrivate::sourceLocation(*this).startZeroLengthLocation();
94
95 return saLocation;
96}
97
103{
104 QQmlSA::SourceLocation saLocation;
105 auto &wrappedLocation = reinterpret_cast<QQmlJS::SourceLocation &>(saLocation.m_data);
106 wrappedLocation = wrappedLocation.endZeroLengthLocation(text);
107
108 return saLocation;
109}
110
111qsizetype QQmlSA::SourceLocation::qHashImpl(const SourceLocation &location, qsizetype seed)
112{
114}
115
116bool QQmlSA::SourceLocation::operatorEqualsImpl(const SourceLocation &lhs,
117 const SourceLocation &rhs)
118{
121}
122
123} // namespace QQmlSA
124
NSData * m_data
SourceLocation endZeroLengthLocation(QStringView text) const
static const QQmlJS::SourceLocation & sourceLocation(const QQmlSA::SourceLocation &sourceLocation)
static constexpr qsizetype sizeOfSourceLocation()
\inmodule QtQmlCompiler
quint32 startColumn() const
Returns the column number containing the beginning of this source location.
SourceLocation(quint32 offset=0, quint32 length=0, quint32 line=0, quint32 column=0)
quint32 startLine() const
Returns the line number containing the beginning of this source location.
quint32 end() const
Returns the offset of the end of this source location.
quint32 length() const
Returns the length of this source location.
quint32 begin() const
Returns the offset of the beginning of this source location.
SourceLocation startZeroLengthLocation() const
Returns a source location of lenth zero pointing to the beginning of this source location.
quint32 offset() const
Returns the offset of the beginning of this source location.
SourceLocation & operator=(const SourceLocation &)
SourceLocation endZeroLengthLocation(QStringView text) const
Returns a source location of lenth zero pointing to the end of this source location pointing to text.
\inmodule QtCore
Definition qstringview.h:78
QString text
\inmodule QtQmlCompiler
Combined button and popup list for selecting options.
size_t qHash(const QFileSystemWatcherPathKey &key, size_t seed=0)
GLint location
GLenum GLuint GLenum GLsizei length
GLenum GLuint GLintptr offset
GLenum GLenum GLsizei void GLsizei void * column
static Q_CONSTINIT QBasicAtomicInteger< unsigned > seed
Definition qrandom.cpp:196
unsigned int quint32
Definition qtypes.h:50
ptrdiff_t qsizetype
Definition qtypes.h:165
QSharedPointer< T > other(t)
[5]