Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
qqmljsutils.cpp File Reference

(78b58582baccb2c214dfb07083e91eb47e45358a)

#include "qqmljsutils_p.h"
#include "qqmljstyperesolver_p.h"
#include "qqmljsscopesbyid_p.h"
#include <algorithm>
+ Include dependency graph for qqmljsutils.cpp:

Go to the source code of this file.

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)
 

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 227 of file qqmljsutils.cpp.

References QQmlJSTypeResolver::equals(), QQmlJSTypeResolver::nullType(), and Q_ASSERT.

+ Here is the call graph for this function:

◆ 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 245 of file qqmljsutils.cpp.

References QQmlJSTypeResolver::equals(), Q_ASSERT, and QQmlJSTypeResolver::urlType().

+ Here is the call graph for this function:

◆ 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 210 of file qqmljsutils.cpp.

References QQmlJSTypeResolver::equals(), Q_ASSERT, and QQmlJSTypeResolver::varType().

+ Here is the call graph for this function:

◆ resolveAlias()

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