MCPcopy Create free account
hub / github.com/KDAB/GammaRay / callableQjsValueToString

Function callableQjsValueToString

plugins/qmlsupport/qmlsupport.cpp:65–80  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

63#endif
64
65static QString callableQjsValueToString(const QJSValue &v)
66{
67 QV4::ExecutionEngine *jsEngine = QJSValuePrivate::engine(&v);
68
69 QV4::Scope scope(jsEngine);
70
71 QV4::Scoped<QV4::QObjectMethod> qobjectMethod(scope, QJSValuePrivate::convertToReturnedValue(jsEngine, v));
72
73 if (!qobjectMethod)
74 return QStringLiteral("<callable>");
75
76 QObject *sender = qobjectMethod->object();
77 Q_ASSERT(sender);
78 QMetaMethod metaMethod = sender->metaObject()->method(qobjectMethod->methodIndex());
79 return metaMethodToString(sender, metaMethod);
80}
81
82static QString qmlErrorToString(const QQmlError &error)
83{

Callers 1

qjsValueToStringFunction · 0.85

Calls 3

metaMethodToStringFunction · 0.85
objectMethod · 0.45
metaObjectMethod · 0.45

Tested by

no test coverage detected