Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qqmljsutils.cpp File Reference

(9e70404a6398a661dc386c51c12b173000fd80fa)

#include "qqmljsutils_p.h"
#include "qqmljstyperesolver_p.h"
#include "qqmljsscopesbyid_p.h"
#include <QtCore/qvarlengtharray.h>
#include <QtCore/qdir.h>
#include <QtCore/qdiriterator.h>
#include <algorithm>
Include dependency graph for qqmljsutils.cpp:

Go to the source code of this file.

Enumerations

enum  FilterType { LocalFileFilter , ResourceFileFilter , LocalFileFilter , ResourceFileFilter }
enum  FilterType { LocalFileFilter , ResourceFileFilter , LocalFileFilter , ResourceFileFilter }

Functions

template<typename ScopeForId>
static QQmlJSUtils::ResolvedAlias resolveAlias (ScopeForId scopeForId, const QQmlJSMetaProperty &property, const QQmlJSScope::ConstPtr &owner, const QQmlJSUtils::AliasResolutionVisitor &visitor)
bool canStrictlyCompareWithVar (const QQmlJSTypeResolver *typeResolver, const QQmlJSScope::ConstPtr &lhsType, const QQmlJSScope::ConstPtr &rhsType)
bool canCompareWithQObject (const QQmlJSTypeResolver *typeResolver, const QQmlJSScope::ConstPtr &lhsType, const QQmlJSScope::ConstPtr &rhsType)
bool canCompareWithQUrl (const QQmlJSTypeResolver *typeResolver, const QQmlJSScope::ConstPtr &lhsType, const QQmlJSScope::ConstPtr &rhsType)
static QQmlJSResourceFileMapper::Entry qmlModuleEntryFromBuildPath (const QQmlJSResourceFileMapper *mapper, const QString &pathInBuildFolder, FilterType type)

Enumeration Type Documentation

◆ FilterType [1/2]

enum FilterType
Enumerator
LocalFileFilter 
ResourceFileFilter 
LocalFileFilter 
ResourceFileFilter 

Definition at line 266 of file qqmljsutils.cpp.

◆ FilterType [2/2]

enum FilterType
Enumerator
LocalFileFilter 
ResourceFileFilter 
LocalFileFilter 
ResourceFileFilter 

Definition at line 266 of file qqmljsutils.cpp.

Function Documentation

◆ canCompareWithQObject()

bool 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.

◆ canCompareWithQUrl()

bool 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.

◆ canStrictlyCompareWithVar()

bool 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.

◆ qmlModuleEntryFromBuildPath()

QQmlJSResourceFileMapper::Entry qmlModuleEntryFromBuildPath ( const QQmlJSResourceFileMapper * mapper,
const QString & pathInBuildFolder,
FilterType type )
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 279 of file qqmljsutils.cpp.

References LocalFileFilter.

◆ resolveAlias()

template<typename ScopeForId>
QQmlJSUtils::ResolvedAlias resolveAlias ( ScopeForId scopeForId,
const QQmlJSMetaProperty & property,
const QQmlJSScope::ConstPtr & owner,
const QQmlJSUtils::AliasResolutionVisitor & visitor )
static

Fully resolves alias property and returns the information about the origin, which is not an alias.

Definition at line 26 of file qqmljsutils.cpp.

References QQmlJSMetaProperty::isAlias().

Here is the call graph for this function: