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)
`location` のハッシュ値を、計算のシードとして `seed ` を使用して返します。
bool operator!=(const QQmlSA::SourceLocation &lhs, const QQmlSA::SourceLocation &rhs)
lhs がrhs と等しくない場合は true を返し、それ以外の場合はfalse を返します。2 つのソースの場所がいつ等しいとみなされるかについては、SourceLocation::operator== を参照してください。
bool operator==(const QQmlSA::SourceLocation &lhs, const QQmlSA::SourceLocation &rhs)
lhs がrhs と等しい場合はtrueを返し、それ以外の場合はfalse を返します。2つの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.