![]() |
Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
|
Classes | |
| struct | ResolvedAlias |
| struct | AliasResolutionVisitor |
Enumerations | |
| enum | PropertyAccessor { PropertyAccessor_Read , PropertyAccessor_Write } |
| enum | ResolvedAliasTarget { AliasTarget_Invalid , AliasTarget_Property , AliasTarget_Object } |
| enum | FilterType { LocalFileFilter , ResourceFileFilter , LocalFileFilter , ResourceFileFilter } |
| enum | FilterType { LocalFileFilter , ResourceFileFilter , LocalFileFilter , ResourceFileFilter } |
Functions | |
| template<typename String, typename CharacterLiteral, typename StringView> | |
| String | escapeString (String s) |
| template<typename String = QString, typename CharacterLiteral = QLatin1Char, typename StringView = QLatin1StringView> | |
| String | toLiteral (const String &s, StringView ctor=StringView("QStringLiteral")) |
| QString | constRefify (QString type) |
| std::optional< QQmlJSMetaProperty > | changeHandlerProperty (const QQmlJSScope::ConstPtr &scope, QStringView signalName) |
| std::optional< QQmlJSMetaProperty > | propertyFromChangedHandler (const QQmlJSScope::ConstPtr &scope, QStringView changedHandler) |
| bool | hasCompositeBase (const QQmlJSScope::ConstPtr &scope) |
| bool | bindablePropertyHasDefaultAccessor (const QQmlJSMetaProperty &p, PropertyAccessor accessor) |
| ResolvedAlias Q_QMLCOMPILER_EXPORT | resolveAlias (const QQmlJSTypeResolver *typeResolver, const QQmlJSMetaProperty &property, const QQmlJSScope::ConstPtr &owner, const AliasResolutionVisitor &visitor) |
| ResolvedAlias Q_QMLCOMPILER_EXPORT | resolveAlias (const QQmlJSScopesById &idScopes, const QQmlJSMetaProperty &property, const QQmlJSScope::ConstPtr &owner, const AliasResolutionVisitor &visitor) |
| template<typename QQmlJSScopePtr, typename Action> | |
| bool | searchBaseAndExtensionTypes (const QQmlJSScopePtr &type, const Action &check) |
| template<typename Action> | |
| void | traverseFollowingQmlIrObjectStructure (const QQmlJSScope::Ptr &root, Action act) |
| template<typename Action> | |
| void | traverseFollowingMetaObjectHierarchy (const QQmlJSScope::ConstPtr &scope, const QQmlJSScope::ConstPtr &start, Action act) |
| std::optional< QQmlJSFixSuggestion > Q_QMLCOMPILER_EXPORT | didYouMean (const QString &userInput, QStringList candidates, const QString &filename, const QQmlJS::SourceLocation &location) |
| std::variant< QString, QQmlJS::DiagnosticMessage > Q_QMLCOMPILER_EXPORT | sourceDirectoryPath (const QQmlJSImporter *importer, const QString &buildDirectoryPath) |
| template<typename Container> | |
| void | deduplicate (Container &container) |
| QStringList | cleanPaths (QStringList &&paths) |
| QStringList Q_QMLCOMPILER_EXPORT | resourceFilesFromBuildFolders (const QStringList &buildFolders) |
| QString Q_QMLCOMPILER_EXPORT | qmlSourcePathFromBuildPath (const QQmlJSResourceFileMapper *mapper, const QString &pathInBuildFolder) |
| QString Q_QMLCOMPILER_EXPORT | qmlBuildPathFromSourcePath (const QQmlJSResourceFileMapper *mapper, const QString &pathInBuildFolder) |
| QString Q_QMLCOMPILER_EXPORT | getScopeName (const QQmlJSScope::ConstPtr &scope, QQmlJSScope::ScopeType type) |
| QString Q_QMLCOMPILER_EXPORT | fileSelectorFor (const QQmlJSScope::ConstPtr &scope1) |
| bool Q_QMLCOMPILER_EXPORT | canStrictlyCompareWithVar (const QQmlJSTypeResolver *typeResolver, const QQmlJSScope::ConstPtr &lhsType, const QQmlJSScope::ConstPtr &rhsType) |
| bool Q_QMLCOMPILER_EXPORT | canCompareWithQObject (const QQmlJSTypeResolver *typeResolver, const QQmlJSScope::ConstPtr &lhsType, const QQmlJSScope::ConstPtr &rhsType) |
| bool Q_QMLCOMPILER_EXPORT | canCompareWithQUrl (const QQmlJSTypeResolver *typeResolver, const QQmlJSScope::ConstPtr &lhsType, const QQmlJSScope::ConstPtr &rhsType) |
| template<typename ScopeForId> | |
| static ResolvedAlias | resolveAlias (ScopeForId scopeForId, const QQmlJSMetaProperty &property, const QQmlJSScope::ConstPtr &owner, const AliasResolutionVisitor &visitor) |
| static QQmlJSResourceFileMapper::Entry | qmlModuleEntryFromBuildPath (const QQmlJSResourceFileMapper *mapper, const QString &pathInBuildFolder, FilterType type) |
Variables | |
| constexpr std::array | cppFileFilters |
| Enumerator | |
|---|---|
| LocalFileFilter | |
| ResourceFileFilter | |
| LocalFileFilter | |
| ResourceFileFilter | |
Definition at line 272 of file qqmljsutils.cpp.
| Enumerator | |
|---|---|
| LocalFileFilter | |
| ResourceFileFilter | |
| LocalFileFilter | |
| ResourceFileFilter | |
Definition at line 272 of file qqmljsutils.cpp.
| Enumerator | |
|---|---|
| PropertyAccessor_Read | |
| PropertyAccessor_Write | |
Definition at line 151 of file qqmljsutils_p.h.
| Enumerator | |
|---|---|
| AliasTarget_Invalid | |
| AliasTarget_Property | |
| AliasTarget_Object | |
Definition at line 178 of file qqmljsutils_p.h.
|
inline |
Returns true if p is bindable and property accessor specified by accessor is equal to "default". Returns false otherwise.
Definition at line 162 of file qqmljsutils_p.h.
References PropertyAccessor_Read, and PropertyAccessor_Write.
| bool QQmlJSUtils::canCompareWithQObject | ( | const QQmlJSTypeResolver * | typeResolver, |
| const QQmlJSScope::ConstPtr & | lhsType, | ||
| const QQmlJSScope::ConstPtr & | rhsType ) |
Utility method that checks if one of the registers is qobject, and the other can be efficiently compared to it
Definition at line 228 of file qqmljsutils.cpp.
| bool QQmlJSUtils::canCompareWithQUrl | ( | const QQmlJSTypeResolver * | typeResolver, |
| const QQmlJSScope::ConstPtr & | lhsType, | ||
| const QQmlJSScope::ConstPtr & | rhsType ) |
Utility method that checks if both sides are QUrl type. In future, that might be extended to support comparison with other types i.e QUrl vs string
Definition at line 244 of file qqmljsutils.cpp.
| bool QQmlJSUtils::canStrictlyCompareWithVar | ( | const QQmlJSTypeResolver * | typeResolver, |
| const QQmlJSScope::ConstPtr & | lhsType, | ||
| const QQmlJSScope::ConstPtr & | rhsType ) |
Utility method that checks if one of the registers is var, and the other can be efficiently compared to it
Definition at line 211 of file qqmljsutils.cpp.
|
inline |
Definition at line 111 of file qqmljsutils_p.h.
|
inline |
Definition at line 390 of file qqmljsutils_p.h.
Returns type string conditionally wrapped into {const} and {&}. This function is mostly useful for code generators.
Definition at line 104 of file qqmljsutils_p.h.
|
inline |
Definition at line 383 of file qqmljsutils_p.h.
| std::optional< QQmlJSFixSuggestion > QQmlJSUtils::didYouMean | ( | const QString & | userInput, |
| QStringList | candidates, | ||
| const QString & | filename, | ||
| const QQmlJS::SourceLocation & | location ) |
Definition at line 104 of file qqmljsutils.cpp.
| String QQmlJSUtils::escapeString | ( | String | s | ) |
Returns escaped version of s. This function is mostly useful for code generators.
Definition at line 77 of file qqmljsutils_p.h.
| QString QQmlJSUtils::fileSelectorFor | ( | const QQmlJSScope::ConstPtr & | scope1 | ) |
Definition at line 393 of file qqmljsutils.cpp.
| QString QQmlJSUtils::getScopeName | ( | const QQmlJSScope::ConstPtr & | scope, |
| QQmlJSScope::ScopeType | type ) |
Returns the name of scope based on type.
Definition at line 374 of file qqmljsutils.cpp.
References QQmlSA::AttachedPropertyScope, and QQmlSA::GroupedPropertyScope.
|
inline |
Definition at line 141 of file qqmljsutils_p.h.
References QQmlSA::QMLScope.
|
inline |
Definition at line 127 of file qqmljsutils_p.h.
| QString QQmlJSUtils::qmlBuildPathFromSourcePath | ( | const QQmlJSResourceFileMapper * | mapper, |
| const QString & | pathInSourceFolder ) |
Obtains the source folder path from a build folder QML file path via the passed mapper, see also \l QQmlJSUtils::qmlSourcePathFromBuildPath.
Definition at line 341 of file qqmljsutils.cpp.
|
static |
Obtain a QML module qrc entry from its qmldir entry.
Contains a heuristic for QML modules without nested-qml-module-with-prefer-feature that tries to find a parent directory that contains a qmldir entry in the qrc.
Definition at line 285 of file qqmljsutils.cpp.
References LocalFileFilter.
| QString QQmlJSUtils::qmlSourcePathFromBuildPath | ( | const QQmlJSResourceFileMapper * | mapper, |
| const QString & | pathInBuildFolder ) |
Obtains the source folder path from a build folder QML file path via the passed mapper.
This works on proper QML modules when using the nested-qml-module-with-prefer-feature from 6.8 and uses a heuristic when the qmldir with the prefer entry is missing.
Definition at line 319 of file qqmljsutils.cpp.
| ResolvedAlias QQmlJSUtils::resolveAlias | ( | const QQmlJSScopesById & | idScopes, |
| const QQmlJSMetaProperty & | property, | ||
| const QQmlJSScope::ConstPtr & | owner, | ||
| const AliasResolutionVisitor & | visitor ) |
Definition at line 93 of file qqmljsutils.cpp.
| ResolvedAlias QQmlJSUtils::resolveAlias | ( | const QQmlJSTypeResolver * | typeResolver, |
| const QQmlJSMetaProperty & | property, | ||
| const QQmlJSScope::ConstPtr & | owner, | ||
| const AliasResolutionVisitor & | visitor ) |
Definition at line 82 of file qqmljsutils.cpp.
|
static |
Fully resolves alias property and returns the information about the origin, which is not an alias.
Definition at line 27 of file qqmljsutils.cpp.
References AliasTarget_Object, QQmlJSMetaProperty::isAlias(), and QQmlJSUtils::ResolvedAlias::kind.
| QStringList QQmlJSUtils::resourceFilesFromBuildFolders | ( | const QStringList & | buildFolders | ) |
Utility method that searches qrc files in given folders. Do not use this when the order or selection of the returned qrc files matters.
Definition at line 258 of file qqmljsutils.cpp.
| bool QQmlJSUtils::searchBaseAndExtensionTypes | ( | const QQmlJSScopePtr & | type, |
| const Action & | check ) |
Definition at line 208 of file qqmljsutils_p.h.
| std::variant< QString, QQmlJS::DiagnosticMessage > QQmlJSUtils::sourceDirectoryPath | ( | const QQmlJSImporter * | importer, |
| const QString & | buildDirectoryPath ) |
Returns a corresponding source directory path for buildDirectoryPath Returns empty string on error
Definition at line 168 of file qqmljsutils.cpp.
| String QQmlJSUtils::toLiteral | ( | const String & | s, |
| StringView | ctor = StringView("QStringLiteral") ) |
Returns s wrapped into a literal macro specified by ctor. By default, returns a QStringLiteral-wrapped literal. This function is mostly useful for code generators.
Definition at line 94 of file qqmljsutils_p.h.
| void QQmlJSUtils::traverseFollowingMetaObjectHierarchy | ( | const QQmlJSScope::ConstPtr & | scope, |
| const QQmlJSScope::ConstPtr & | start, | ||
| Action | act ) |
Traverses the base types and extensions of scope in the order aligned with QMetaObjects created at run time for these types and extensions (except that QQmlVMEMetaObject is ignored). start is the starting type in the hierarchy where act is applied.
Definition at line 311 of file qqmljsutils_p.h.
| void QQmlJSUtils::traverseFollowingQmlIrObjectStructure | ( | const QQmlJSScope::Ptr & | root, |
| Action | act ) |
Definition at line 279 of file qqmljsutils_p.h.
|
inlineconstexpr |
Definition at line 409 of file qqmljsutils_p.h.