GenericPass Class
class QQmlSA::GenericPass정적 분석을 위한 기본 클래스가 전달됩니다. 더 보기...
Header: | #include <GenericPass> |
CMake: | find_package(Qt6 REQUIRED COMPONENTS QmlCompiler) target_link_libraries(mytarget PRIVATE Qt6::QmlCompiler) |
에 의해 상속되었습니다: | |
상태: | 기술 미리보기 |
공용 함수
GenericPass(QQmlSA::PassManager *manager) | |
void | emitWarning(QAnyStringView diagnostic, QQmlSA::LoggerWarningId id) |
void | emitWarning(QAnyStringView diagnostic, QQmlSA::LoggerWarningId id, QQmlSA::SourceLocation srcLocation) |
void | emitWarning(QAnyStringView diagnostic, QQmlSA::LoggerWarningId id, QQmlSA::SourceLocation srcLocation, const QQmlSA::FixSuggestion &fix) |
QQmlSA::Element | resolveAttached(QAnyStringView moduleName, QAnyStringView typeName) |
QQmlSA::Element | resolveAttachedInFileScope(QAnyStringView typeName) |
QQmlSA::Element | resolveBuiltinType(QAnyStringView typeName) const |
QString | resolveElementToId(const QQmlSA::Element &element, const QQmlSA::Element &context) |
QQmlSA::Element | resolveIdToElement(QAnyStringView id, const QQmlSA::Element &context) |
QQmlSA::Element | resolveLiteralType(const QQmlSA::Binding &binding) |
QQmlSA::Element | resolveType(QAnyStringView moduleName, QAnyStringView typeName) |
QQmlSA::Element | resolveTypeInFileScope(QAnyStringView typeName) |
QString | sourceCode(QQmlSA::SourceLocation location) |
상세 설명
이 클래스에는 보다 구체적인 패스에 사용되는 공통 기능이 포함되어 있습니다. 사용자 지정 패스는 이 클래스에서 직접 파생되지 않고 하위 클래스 중 하나에서 파생되어야 합니다.
ElementPass 및 PropertyPass 을참조하세요 .
멤버 함수 문서
GenericPass::GenericPass(QQmlSA::PassManager *manager)
일반 패스를 생성합니다.
void GenericPass::emitWarning(QAnyStringView diagnostic, QQmlSA::LoggerWarningId id)
id 유형의 문제에 대한 경고 메시지 diagnostic 를 표시합니다.
void GenericPass::emitWarning(QAnyStringView diagnostic, QQmlSA::LoggerWarningId id, QQmlSA::SourceLocation srcLocation)
srcLocation 에 있는 id 유형의 문제에 대해 경고 메시지 diagnostic 를 표시합니다.
void GenericPass::emitWarning(QAnyStringView diagnostic, QQmlSA::LoggerWarningId id, QQmlSA::SourceLocation srcLocation, const QQmlSA::FixSuggestion &fix)
srcLocation 에 있는 id 유형의 문제에 대한 경고 메시지 diagnostic 와 제안된 수정 사항 fix 을 표시합니다.
QQmlSA::Element GenericPass::resolveAttached(QAnyStringView moduleName, QAnyStringView typeName)
모듈 moduleName 에 정의된 typeName 의 첨부 유형을 반환합니다.
QQmlSA::Element GenericPass::resolveAttachedInFileScope(QAnyStringView typeName)
현재 분석된 파일 내에서 사용된 typeName 에 해당하는 첨부 유형을 반환합니다.
QQmlSA::Element GenericPass::resolveBuiltinType(QAnyStringView typeName) const
typeName 에 의해 식별된 내장 타입의 타입을 반환합니다. 빌트인 타입은 QML 엔진이 임포트 없이 처리할 수 있는 C++
타입(예: QDateTime 과 QString), Number
과 같은 전역 EcmaScript 객체, 그리고 전역 Qt 객체를 포함합니다.
QString GenericPass::resolveElementToId(const QQmlSA::Element &element, const QQmlSA::Element &context)
주어진 context 에서 element 의 아이디를 반환합니다.
QQmlSA::Element GenericPass::resolveIdToElement(QAnyStringView id, const QQmlSA::Element &context)
context 에서 아이디가 id 인 요소를 반환합니다.
QQmlSA::Element GenericPass::resolveLiteralType(const QQmlSA::Binding &binding)
binding 의 리터럴 유형을 나타내는 요소를 반환합니다. 바인딩에 리터럴 값이 포함되어 있지 않으면 null 요소가 반환됩니다.
QQmlSA::Element GenericPass::resolveType(QAnyStringView moduleName, QAnyStringView typeName)
모듈 moduleName 에 정의된 typeName 의 유형을 반환합니다. 첨부된 유형과 첨부되지 않은 유형이 같은 이름을 공유하는 경우(예: ListView
), 첨부되지 않은 유형에 해당하는 Element 이 반환됩니다. 첨부된 유형을 얻으려면 resolveAttached 을 사용합니다.
QQmlSA::Element GenericPass::resolveTypeInFileScope(QAnyStringView typeName)
현재 분석된 파일 내에서 typeName 에 해당하는 유형을 반환합니다.
QString GenericPass::sourceCode(QQmlSA::SourceLocation location)
location 내에 있는 소스 코드를 반환합니다.
© 2025 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.