QtQml: Disambiguate static variables and methods
They cause clashes in CMake Unity (Jumbo) builds. Pick-to: 6.5 Task-number: QTBUG-109394 Change-Id: I0408c01d3e6f0f4dc74904e12a3036a855cc3225 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
This commit is contained in:
parent
6cca731f3e
commit
69708da26e
|
@ -41,8 +41,8 @@ bool Function::call(QObject *thisObject, void **a, const QMetaType *types, int a
|
|||
}
|
||||
|
||||
static ReturnedValue doCall(
|
||||
Function *self, const Value *thisObject, const Value *argv, int argc,
|
||||
ExecutionContext *context)
|
||||
QV4::Function *self, const QV4::Value *thisObject, const QV4::Value *argv, int argc,
|
||||
QV4::ExecutionContext *context)
|
||||
{
|
||||
ExecutionEngine *engine = context->engine();
|
||||
JSTypesStackFrame frame;
|
||||
|
|
|
@ -507,7 +507,8 @@ void ArrowFunction::virtualCallWithMetaTypes(const FunctionObject *fo, QObject *
|
|||
frame.pop(scope.engine);
|
||||
}
|
||||
|
||||
static ReturnedValue doCall(const FunctionObject *fo, const Value *thisObject, const Value *argv, int argc)
|
||||
static ReturnedValue qfoDoCall(const QV4::FunctionObject *fo, const QV4::Value *thisObject,
|
||||
const QV4::Value *argv, int argc)
|
||||
{
|
||||
ExecutionEngine *engine = fo->engine();
|
||||
JSTypesStackFrame frame;
|
||||
|
@ -531,7 +532,8 @@ static ReturnedValue doCall(const FunctionObject *fo, const Value *thisObject, c
|
|||
return result;
|
||||
}
|
||||
|
||||
ReturnedValue ArrowFunction::virtualCall(const FunctionObject *fo, const Value *thisObject, const Value *argv, int argc)
|
||||
ReturnedValue ArrowFunction::virtualCall(const QV4::FunctionObject *fo, const Value *thisObject,
|
||||
const QV4::Value *argv, int argc)
|
||||
{
|
||||
Function *function = fo->function();
|
||||
switch (function->kind) {
|
||||
|
@ -545,13 +547,13 @@ ReturnedValue ArrowFunction::virtualCall(const FunctionObject *fo, const Value *
|
|||
return QV4::coerceAndCall(
|
||||
fo->engine(), function->typedFunction, thisObject, argv, argc,
|
||||
[fo](const Value *thisObject, const Value *argv, int argc) {
|
||||
return doCall(fo, thisObject, argv, argc);
|
||||
return qfoDoCall(fo, thisObject, argv, argc);
|
||||
});
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return doCall(fo, thisObject, argv, argc);
|
||||
return qfoDoCall(fo, thisObject, argv, argc);
|
||||
}
|
||||
|
||||
void Heap::ArrowFunction::init(QV4::ExecutionContext *scope, Function *function, QV4::String *n)
|
||||
|
|
|
@ -249,7 +249,8 @@ struct ArrowFunction : FunctionObject {
|
|||
|
||||
static void virtualCallWithMetaTypes(const FunctionObject *f, QObject *thisObject,
|
||||
void **a, const QMetaType *types, int argc);
|
||||
static ReturnedValue virtualCall(const FunctionObject *f, const Value *thisObject, const Value *argv, int argc);
|
||||
static ReturnedValue virtualCall(const QV4::FunctionObject *f, const QV4::Value *thisObject,
|
||||
const QV4::Value *argv, int argc);
|
||||
};
|
||||
|
||||
struct ScriptFunction : ArrowFunction {
|
||||
|
|
|
@ -45,14 +45,12 @@ void Script::parse()
|
|||
if (parsed)
|
||||
return;
|
||||
|
||||
using namespace QV4::Compiler;
|
||||
|
||||
parsed = true;
|
||||
|
||||
ExecutionEngine *v4 = context->engine();
|
||||
Scope valueScope(v4);
|
||||
|
||||
Module module(v4->debugger() != nullptr);
|
||||
QV4::Compiler::Module module(v4->debugger() != nullptr);
|
||||
|
||||
if (sourceCode.startsWith(QLatin1String("function("))) {
|
||||
static const int snippetLength = 70;
|
||||
|
|
|
@ -179,7 +179,7 @@ inline QQmlPropertyCacheCreator<ObjectContainer>::QQmlPropertyCacheCreator(QQmlP
|
|||
}
|
||||
|
||||
// create a graph on inline components referencing inline components
|
||||
std::vector<Node> nodes;
|
||||
std::vector<icutils::Node> nodes;
|
||||
nodes.resize(allICs.size());
|
||||
std::iota(nodes.begin(), nodes.end(), 0);
|
||||
AdjacencyList adjacencyList;
|
||||
|
|
|
@ -46,7 +46,7 @@ V *valueFromMultimap(QMultiMap<K, V> &mmap, const K &key, index_type idx)
|
|||
return &(*it);
|
||||
}
|
||||
|
||||
static ErrorGroups myParseErrors()
|
||||
static ErrorGroups astParseErrors()
|
||||
{
|
||||
static ErrorGroups errs = { { NewErrorGroup("Dom"), NewErrorGroup("QmlFile"),
|
||||
NewErrorGroup("Parsing") } };
|
||||
|
@ -381,7 +381,7 @@ public:
|
|||
el->propertyToken());
|
||||
if (p.name == u"id")
|
||||
qmlFile.addError(
|
||||
myParseErrors()
|
||||
astParseErrors()
|
||||
.warning(tr("id is a special attribute, that should not be "
|
||||
"used as property name"))
|
||||
.withPath(currentNodeEl().path));
|
||||
|
@ -635,7 +635,7 @@ public:
|
|||
Path bPathFromOwner = current<QmlObject>().addBinding(
|
||||
Binding(toString(el->qualifiedId), value, bType), AddOption::KeepExisting, &bPtr);
|
||||
if (bPtr->name() == u"id")
|
||||
qmlFile.addError(myParseErrors()
|
||||
qmlFile.addError(astParseErrors()
|
||||
.warning(tr("id attributes should only be a lower case letter "
|
||||
"followed by letters, numbers or underscore, "
|
||||
"assuming they refer to an id property"))
|
||||
|
@ -700,7 +700,7 @@ public:
|
|||
auto m = idRe.matchView(iExp->name);
|
||||
if (!m.hasMatch()) {
|
||||
qmlFile.addError(
|
||||
myParseErrors()
|
||||
astParseErrors()
|
||||
.warning(
|
||||
tr("id attributes should only be a lower case letter "
|
||||
"followed by letters, numbers or underscore, not %1")
|
||||
|
@ -712,7 +712,7 @@ public:
|
|||
&bindingPtr);
|
||||
Q_ASSERT_X(bindingPtr, className, "binding could not be retrieved");
|
||||
qmlFile.addError(
|
||||
myParseErrors()
|
||||
astParseErrors()
|
||||
.warning(tr("id attributes should only be a lower case letter "
|
||||
"followed by letters, numbers or underscore, not %1 "
|
||||
"%2, assuming they refer to a property")
|
||||
|
@ -766,7 +766,7 @@ public:
|
|||
current<QmlObject>().addBinding(bindingV, AddOption::KeepExisting, &bindingPtr);
|
||||
if (bindingV.name() == u"id")
|
||||
qmlFile.addError(
|
||||
myParseErrors()
|
||||
astParseErrors()
|
||||
.error(tr("id attributes should have only simple strings as values"))
|
||||
.withPath(bindingPathFromOwner));
|
||||
pushEl(bindingPathFromOwner, *bindingPtr, el);
|
||||
|
@ -945,7 +945,7 @@ public:
|
|||
|
||||
void throwRecursionDepthError() override
|
||||
{
|
||||
qmlFile.addError(myParseErrors().error(
|
||||
qmlFile.addError(astParseErrors().error(
|
||||
tr("Maximum statement or expression depth exceeded in QmlDomAstCreator")));
|
||||
}
|
||||
};
|
||||
|
|
|
@ -24,7 +24,7 @@ namespace Dom {
|
|||
|
||||
using namespace QQmlJS::AST;
|
||||
|
||||
static ErrorGroups myParseErrors()
|
||||
static ErrorGroups readerParseErrors()
|
||||
{
|
||||
static ErrorGroups errs = { { NewErrorGroup("Dom"), NewErrorGroup("QmltypesFile"),
|
||||
NewErrorGroup("Parsing") } };
|
||||
|
@ -49,7 +49,7 @@ void QmltypesReader::insertProperty(QQmlJSScope::Ptr jsScope, const QQmlJSMetaPr
|
|||
prop.notify = property.notify();
|
||||
|
||||
if (prop.name.isEmpty() || prop.typeName.isEmpty()) {
|
||||
addError(myParseErrors()
|
||||
addError(readerParseErrors()
|
||||
.warning(tr("Property object is missing a name or type script binding."))
|
||||
.handle());
|
||||
return;
|
||||
|
@ -86,7 +86,7 @@ void QmltypesReader::insertSignalOrMethod(const QQmlJSMetaMethod &metaMethod,
|
|||
int revision = metaMethod.revision();
|
||||
methodInfo.isConstructor = metaMethod.isConstructor();
|
||||
if (methodInfo.name.isEmpty()) {
|
||||
addError(myParseErrors().error(tr("Method or signal is missing a name.")).handle());
|
||||
addError(readerParseErrors().error(tr("Method or signal is missing a name.")).handle());
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -193,7 +193,7 @@ void QmltypesReader::insertComponent(const QQmlJSScope::Ptr &jsScope,
|
|||
while (it != begin) {
|
||||
--it;
|
||||
if (it.key() < 0) {
|
||||
addError(myParseErrors().error(
|
||||
addError(readerParseErrors().error(
|
||||
tr("negative meta revision %1 not supported").arg(it.key())));
|
||||
}
|
||||
revToPath.insert(it.key(), compPath.field(Fields::objects).index(objectIndex));
|
||||
|
@ -230,7 +230,7 @@ void QmltypesReader::insertComponent(const QQmlJSScope::Ptr &jsScope,
|
|||
}
|
||||
|
||||
if (comp.name().isEmpty()) {
|
||||
addError(myParseErrors()
|
||||
addError(readerParseErrors()
|
||||
.error(tr("Component definition is missing a name binding."))
|
||||
.handle());
|
||||
return;
|
||||
|
|
Loading…
Reference in New Issue