QQmlSA::SourceLocation Class
class QQmlSA::SourceLocationIndica una posizione o una regione nel codice sorgente. Per saperne di più...
| Intestazione: | #include <qqmlsasourcelocation.h> |
| CMake: | find_package(Qt6 REQUIRED COMPONENTS QmlCompiler) target_link_libraries(mytarget PRIVATE Qt6::QmlCompiler) |
| Stato: | Anteprima tecnologica |
Questa classe è in anteprima tecnologica ed è soggetta a modifiche.
Funzioni pubbliche
| 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) |
Membri pubblici statici
(since 6.12) QQmlSA::SourceLocation | documentOrigin() |
Elementi non membri correlati
| 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) |
Documentazione sulle funzioni membro
[explicit] SourceLocation::SourceLocation(quint32 offset = 0, quint32 length = 0, quint32 line = 0, quint32 column = 0)
Crea un nuovo oggetto `SourceLocation` con i valori specificati in offset, length, line e column.
SourceLocation::SourceLocation(const QQmlSA::SourceLocation &other)
Crea una copia di other.
[noexcept] SourceLocation::SourceLocation(QQmlSA::SourceLocation &&other)
Move: crea un oggetto `SourceLocation` a partire da ` other`.
[noexcept] SourceLocation::~SourceLocation()
Distrugge questa istanza di SourceLocation.
quint32 SourceLocation::begin() const
Restituisce l'offset dell'inizio di questa posizione sorgente.
[static, since 6.12] QQmlSA::SourceLocation SourceLocation::documentOrigin()
Restituisce la posizione sorgente dell'origine di qualsiasi documento QML.
Questa funzione è stata introdotta in Qt 6.12.
quint32 SourceLocation::end() const
Restituisce l'offset della fine di questa posizione sorgente.
QQmlSA::SourceLocation SourceLocation::endZeroLengthLocation(QStringView text) const
Restituisce una posizione sorgente di lunghezza zero che punta alla fine di questa posizione sorgente, a sua volta puntante a text.
bool SourceLocation::isValid() const
Restituisce " true " se " SourceLocation " è valido, altrimenti " false ".
quint32 SourceLocation::length() const
Restituisce la lunghezza di questa posizione sorgente.
quint32 SourceLocation::offset() const
Restituisce l'offset dell'inizio di questa posizione sorgente.
quint32 SourceLocation::startColumn() const
Restituisce il numero della colonna in cui si trova l'inizio di questa posizione di origine.
quint32 SourceLocation::startLine() const
Restituisce il numero di riga in cui si trova l'inizio di questa posizione nel codice sorgente.
QQmlSA::SourceLocation SourceLocation::startZeroLengthLocation() const
Restituisce una posizione sorgente di lunghezza zero che punta all'inizio di questa posizione sorgente.
[noexcept] QQmlSA::SourceLocation &SourceLocation::operator=(QQmlSA::SourceLocation &&other)
Assegna " other " a questo " SourceLocation".
QQmlSA::SourceLocation &SourceLocation::operator=(const QQmlSA::SourceLocation &other)
Assegna other a questo SourceLocation.
Persone correlate non iscritte
qsizetype qHash(const QQmlSA::SourceLocation &location, qsizetype seed = 0)
Restituisce il valore hash per location, utilizzando seed come seme per il calcolo.
bool operator!=(const QQmlSA::SourceLocation &lhs, const QQmlSA::SourceLocation &rhs)
Restituisce true se lhs non è uguale a rhs, e false in caso contrario. Vedi SourceLocation::operator== per sapere quando due posizioni di origine sono considerate uguali.
bool operator==(const QQmlSA::SourceLocation &lhs, const QQmlSA::SourceLocation &rhs)
Restituisce true se lhs è uguale a rhs, e false in caso contrario. Due oggetti SourceLocation sono considerati uguali se presentano gli stessi valori per i membri offset, length, line e 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.