aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/corelib/language/evaluator.h
diff options
context:
space:
mode:
authorJoerg Bornemann <joerg.bornemann@theqtcompany.com>2015-01-07 11:46:52 +0100
committerJoerg Bornemann <joerg.bornemann@theqtcompany.com>2015-01-13 11:47:50 +0100
commitd350741c4c8522a5f19603654051e073128f2923 (patch)
treed9a6cba2544fe42be66349a08ef532ec4128495f /src/lib/corelib/language/evaluator.h
parent2c0970de8a2a06b3f7e3cc30762974facf425965 (diff)
add method Evaluator::value
Evaluator::value is the error checking property accessor method with error checking that does no type conversion. Evaluator::stringValue and friends are now implemented in terms of Evaluator::value to get rid of duplicated code. Change-Id: I416f5aad550756c19b918ebe6fd723a9acb11c28 Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
Diffstat (limited to 'src/lib/corelib/language/evaluator.h')
-rw-r--r--src/lib/corelib/language/evaluator.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/lib/corelib/language/evaluator.h b/src/lib/corelib/language/evaluator.h
index b0a1f4eb4..073417d85 100644
--- a/src/lib/corelib/language/evaluator.h
+++ b/src/lib/corelib/language/evaluator.h
@@ -55,6 +55,7 @@ public:
ScriptEngine *engine() const;
QScriptValue property(const Item *item, const QString &name);
+ QScriptValue value(const Item *item, const QString &name, bool *propertySet = 0);
bool boolValue(const Item *item, const QString &name, bool defaultValue = false,
bool *propertyWasSet = 0);
FileTags fileTagsValue(const Item *item, const QString &name, bool *propertySet = 0);
@@ -70,6 +71,8 @@ private:
void onItemDestroyed(Item *item);
void handleEvaluationError(const Item *item, const QString &name,
const QScriptValue &scriptValue);
+ bool evaluateProperty(QScriptValue *result, const Item *item, const QString &name,
+ bool *propertyWasSet);
ScriptEngine *m_scriptEngine;
EvaluatorScriptClass *m_scriptClass;