aboutsummaryrefslogtreecommitdiffstats
path: root/src/libs/qmljs/qmljsinterpreter.cpp
diff options
context:
space:
mode:
authorNikita Baryshnikov <[email protected]>2015-01-08 22:43:39 +0300
committerNikita Baryshnikov <[email protected]>2015-04-15 08:02:50 +0000
commit12dffc659097ee54f831cd742b63f477e4ad6afe (patch)
treecd6e0cfe35b345b060f3a2213f914bcbf2475a6f /src/libs/qmljs/qmljsinterpreter.cpp
parent24e3445a35548d10705e87d3a0182553e2126fc2 (diff)
Qml&Js: properties/methods/enums inspection
.. of builtIn qml and cpp code over "Inspect API For Element Under Cursor" action. Change-Id: I70d5bec2933b682295c5242248a2b0f95dba4e76 Reviewed-by: Kai Koehne <[email protected]>
Diffstat (limited to 'src/libs/qmljs/qmljsinterpreter.cpp')
-rw-r--r--src/libs/qmljs/qmljsinterpreter.cpp59
1 files changed, 28 insertions, 31 deletions
diff --git a/src/libs/qmljs/qmljsinterpreter.cpp b/src/libs/qmljs/qmljsinterpreter.cpp
index d750af64f16..5b9c3d2fd9e 100644
--- a/src/libs/qmljs/qmljsinterpreter.cpp
+++ b/src/libs/qmljs/qmljsinterpreter.cpp
@@ -137,40 +137,37 @@ public:
} // end of anonymous namespace
namespace QmlJS {
-namespace Internal {
-class MetaFunction: public FunctionValue
-{
- FakeMetaMethod m_method;
-public:
- MetaFunction(const FakeMetaMethod &method, ValueOwner *valueOwner)
- : FunctionValue(valueOwner), m_method(method)
- {
- }
+MetaFunction::MetaFunction(const FakeMetaMethod &method, ValueOwner *valueOwner)
+ : FunctionValue(valueOwner), m_method(method)
+{
+}
- virtual int namedArgumentCount() const
- {
- return m_method.parameterNames().size();
- }
+int MetaFunction::namedArgumentCount() const
+{
+ return m_method.parameterNames().size();
+}
- virtual QString argumentName(int index) const
- {
- if (index < m_method.parameterNames().size())
- return m_method.parameterNames().at(index);
+QString MetaFunction::argumentName(int index) const
+{
+ if (index < m_method.parameterNames().size())
+ return m_method.parameterNames().at(index);
- return FunctionValue::argumentName(index);
- }
+ return FunctionValue::argumentName(index);
+}
- virtual bool isVariadic() const
- {
- return false;
- }
- const MetaFunction *asMetaFunction() const
- {
- return this;
- }
-};
-} // namespace Internal
+bool MetaFunction::isVariadic() const
+{
+ return false;
+}
+const MetaFunction *MetaFunction::asMetaFunction() const
+{
+ return this;
+}
+const FakeMetaMethod &MetaFunction::fakeMetaMethod() const
+{
+ return m_method;
+}
FakeMetaObjectWithOrigin::FakeMetaObjectWithOrigin(FakeMetaObject::ConstPtr fakeMetaObject, const QString &originId)
: fakeMetaObject(fakeMetaObject)
@@ -293,7 +290,7 @@ void CppComponentValue::processMembers(MemberProcessor *processor) const
signatures = new QList<const Value *>;
signatures->reserve(m_metaObject->methodCount());
for (int index = 0; index < m_metaObject->methodCount(); ++index)
- signatures->append(new Internal::MetaFunction(m_metaObject->method(index), valueOwner()));
+ signatures->append(new MetaFunction(m_metaObject->method(index), valueOwner()));
if (!m_metaSignatures.testAndSetOrdered(0, signatures)) {
delete signatures;
signatures = m_metaSignatures.load();
@@ -830,7 +827,7 @@ const Function *Value::asFunction() const
return 0;
}
-const Internal::MetaFunction *Value::asMetaFunction() const
+const MetaFunction *Value::asMetaFunction() const
{
return 0;
}