forked from qt-creator/qt-creator
QmlJS: Improve completion and hints for functions.
* FunctionValues know about optional arguments (for builtins) * ASTFunctionValues only report themselves as variadic if they use the 'arguments' array. * Function argument hint shows optional args and variadic. * Completion automatically adds parentheses. Change-Id: Ib2598600ff8b1ce8c5de3bcabd24a3e171ff3a57 Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
This commit is contained in:
@@ -142,8 +142,10 @@ public:
|
||||
private:
|
||||
void initializePrototypes();
|
||||
|
||||
Function *addFunction(ObjectValue *object, const QString &name, const Value *result, int argumentCount = 0);
|
||||
Function *addFunction(ObjectValue *object, const QString &name, int argumentCount = 0);
|
||||
Function *addFunction(ObjectValue *object, const QString &name, const Value *result,
|
||||
int argumentCount = 0, int optionalCount = 0, bool variadic = false);
|
||||
Function *addFunction(ObjectValue *object, const QString &name,
|
||||
int argumentCount = 0, int optionalCount = 0, bool variadic = false);
|
||||
|
||||
private:
|
||||
ObjectValue *_objectPrototype;
|
||||
|
||||
Reference in New Issue
Block a user