이 페이지에서

QQmlSA::SourceLocation Class

class QQmlSA::SourceLocation

소스 코드 내의 위치나 영역을 나타냅니다. 더 보기...

헤더: #include <qqmlsasourcelocation.h>
CMake: find_package(Qt6 REQUIRED COMPONENTS QmlCompiler)
target_link_libraries(mytarget PRIVATE Qt6::QmlCompiler)
상태: 기술 미리보기

이 클래스는 기술 미리보기 단계에 있으며 변경될 수 있습니다.

공개 함수

SourceLocation(quint32 offset = 0, quint32 length = 0, quint32 line = 0, quint32 column = 0)
SourceLocation(const QQmlSA::SourceLocation &other)
SourceLocation(QQmlSA::SourceLocation &&other)
~SourceLocation()
quint32 begin() const
quint32 end() const
QQmlSA::SourceLocation endZeroLengthLocation(QStringView text) const
bool isValid() const
quint32 length() const
quint32 offset() const
quint32 startColumn() const
quint32 startLine() const
QQmlSA::SourceLocation startZeroLengthLocation() const
QQmlSA::SourceLocation &operator=(QQmlSA::SourceLocation &&other)
QQmlSA::SourceLocation &operator=(const QQmlSA::SourceLocation &other)

정적 공용 멤버

(since 6.12) QQmlSA::SourceLocation documentOrigin()
qsizetype qHash(const QQmlSA::SourceLocation &location, qsizetype seed = 0)
bool operator!=(const QQmlSA::SourceLocation &lhs, const QQmlSA::SourceLocation &rhs)
bool operator==(const QQmlSA::SourceLocation &lhs, const QQmlSA::SourceLocation &rhs)

자세한 설명

멤버 함수 설명서

[explicit] SourceLocation::SourceLocation(quint32 offset = 0, quint32 length = 0, quint32 line = 0, quint32 column = 0)

offset, length, line 및 column 에서 지정된 값을 사용하여 새로운 SourceLocation 객체를 생성합니다.

SourceLocation::SourceLocation(const QQmlSA::SourceLocation &other)

other 의 복사본을 생성합니다.

[noexcept] SourceLocation::SourceLocation(QQmlSA::SourceLocation &&other)

other 에서 SourceLocation을 생성합니다.

[noexcept] SourceLocation::~SourceLocation()

이 SourceLocation 인스턴스를 파기합니다.

quint32 SourceLocation::begin() const

이 소스 위치의 시작 부분의 오프셋을 반환합니다.

[static, since 6.12] QQmlSA::SourceLocation SourceLocation::documentOrigin()

모든 QML 문서의 원점 위치를 반환합니다.

이 함수는 Qt 6.12에서 도입되었습니다.

quint32 SourceLocation::end() const

이 소스 위치의 끝 부분의 오프셋을 반환합니다.

QQmlSA::SourceLocation SourceLocation::endZeroLengthLocation(QStringView text) const

text 를 가리키는 이 소스 위치의 끝을 가리키는, 길이가 0인 소스 위치를 반환합니다.

bool SourceLocation::isValid() const

true 를 반환하며, SourceLocation 가 유효한 경우 이 값을 반환하고, 그렇지 않은 경우 false 를 반환합니다.

quint32 SourceLocation::length() const

이 소스 위치의 길이를 반환합니다.

quint32 SourceLocation::offset() const

이 소스 위치의 시작 부분의 오프셋을 반환합니다.

quint32 SourceLocation::startColumn() const

이 소스 위치의 시작 부분이 포함된 열 번호를 반환합니다.

quint32 SourceLocation::startLine() const

이 소스 위치의 시작 부분이 포함된 줄 번호를 반환합니다.

QQmlSA::SourceLocation SourceLocation::startZeroLengthLocation() const

이 소스 위치의 시작 부분을 가리키는, 길이가 0인 소스 위치를 반환합니다.

[noexcept] QQmlSA::SourceLocation &SourceLocation::operator=(QQmlSA::SourceLocation &&other)

other 를 이 SourceLocation 로 이동 및 할당합니다.

QQmlSA::SourceLocation &SourceLocation::operator=(const QQmlSA::SourceLocation &other)

other 를 이 SourceLocation 에 할당합니다.

관련 비회원

qsizetype qHash(const QQmlSA::SourceLocation &location, qsizetype seed = 0)

seed 를 계산의 시드로 사용하여 location 에 대한 해시 값을 반환합니다.

bool operator!=(const QQmlSA::SourceLocation &lhs, const QQmlSA::SourceLocation &rhs)

lhs 가 rhs 와 같지 않은 경우 true를 반환하고, 그 외의 경우에는 false 를 반환합니다. 두 소스 위치가 언제 동일한 것으로 간주되는지에 대해서는 SourceLocation::operator== 를 참조하십시오.

bool operator==(const QQmlSA::SourceLocation &lhs, const QQmlSA::SourceLocation &rhs)

lhs 이 rhs 과 같을 경우 true를 반환하고, 그렇지 않은 경우 false 을 반환합니다. 두 SourceLocation은 offset, length, line, column 멤버의 값이 모두 동일할 때 서로 동일한 것으로 간주됩니다.

© 2026 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.