44QQmlScriptString QQmlScriptStringPrivate::create(
const QString &script, QQmlContext *context,
47 return QQmlScriptString(script, context, scope);
61QQmlScriptString::QQmlScriptString(
const QString &script, QQmlContext *context, QObject *scope)
98bool QQmlScriptString::operator==(
const QQmlScriptString &other)
const
105 if (d->isNumberLiteral || other.d->isNumberLiteral)
106 return d->isNumberLiteral && other.d->isNumberLiteral && d->numberValue == other.d->numberValue;
108 if (d->isStringLiteral || other.d->isStringLiteral)
109 return d->isStringLiteral && other.d->isStringLiteral && d->script == other.d->script;
111 if (d->script == QLatin1String(
"true") ||
112 d->script == QLatin1String(
"false") ||
113 d->script == QLatin1String(
"undefined") ||
114 d->script == QLatin1String(
"null"))
115 return d->script == other.d->script;
117 return d->context == other.d->context &&
118 d->scope == other.d->scope &&
119 d->script == other.d->script &&
120 d->bindingId == other.d->bindingId;