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_p.h File Reference

(9b784345795984878d2938d6903e7c87ae7f0778)

#include <qtqmlcompilerexports.h>
#include "qqmljslogger_p.h"
#include "qqmljsregistercontent_p.h"
#include "qqmljsscope_p.h"
#include "qqmljsmetatypes_p.h"
#include <QtCore/qdir.h>
#include <QtCore/qstack.h>
#include <QtCore/qstring.h>
#include <QtCore/qstringbuilder.h>
#include <QtCore/qstringview.h>
#include <QtQml/private/qqmlsignalnames_p.h>
#include <private/qduplicatetracker_p.h>
#include <optional>
#include <functional>
#include <type_traits>
#include <variant>
+ Include dependency graph for qqmljsutils_p.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  QQmlJSUtils
 
struct  QQmlJSUtils::ResolvedAlias
 
struct  QQmlJSUtils::AliasResolutionVisitor
 

Namespaces

namespace  detail
 

Functions

template<typename To , typename From , typename std::enable_if_t<!std::is_pointer_v< To >, int > = 0>
static auto detail::getQQmlJSScopeFromSmartPtr (const From &p) -> From
 
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)
 

Function Documentation

◆ canCompareWithQObject()

bool Q_QMLCOMPILER_EXPORT 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 Q_QMLCOMPILER_EXPORT 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 Q_QMLCOMPILER_EXPORT 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: