aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/corelib/language/evaluatorscriptclass.cpp
diff options
context:
space:
mode:
authorJake Petroules <jake.petroules@qt.io>2017-05-10 01:25:19 -0700
committerJake Petroules <jake.petroules@qt.io>2017-05-23 16:50:08 +0000
commit20149803a44856ea25063077964c1159b6d7a078 (patch)
tree4cd0b818e1fbe5861095d7acd516451322570bc6 /src/lib/corelib/language/evaluatorscriptclass.cpp
parent41595d0cf8ac00416a3a8a437eedde2715f75500 (diff)
Replace QSharedPointer/QWeakPointer with std::shared_ptr/std::weak_ptr
Change-Id: I2915c578968bed425a8d8b617b56df88ed3f2882 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Diffstat (limited to 'src/lib/corelib/language/evaluatorscriptclass.cpp')
-rwxr-xr-xsrc/lib/corelib/language/evaluatorscriptclass.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/lib/corelib/language/evaluatorscriptclass.cpp b/src/lib/corelib/language/evaluatorscriptclass.cpp
index 3050e4261..efc574e37 100755
--- a/src/lib/corelib/language/evaluatorscriptclass.cpp
+++ b/src/lib/corelib/language/evaluatorscriptclass.cpp
@@ -228,7 +228,7 @@ private:
}
if (overrides.toBool())
value->setIsExclusiveListValue();
- value = alternative->value.data();
+ value = alternative->value.get();
break;
}
}
@@ -355,7 +355,7 @@ QScriptClass::QueryFlags EvaluatorScriptClass::queryItemProperty(const Evaluatio
{
for (const Item *item = data->item; item; item = item->prototype()) {
m_queryResult.value = item->ownProperty(name);
- if (!m_queryResult.value.isNull()) {
+ if (m_queryResult.value) {
m_queryResult.data = data;
m_queryResult.itemOfProperty = item;
return HandlesReadAccess;
@@ -393,7 +393,7 @@ void EvaluatorScriptClass::collectValuesFromNextChain(const EvaluationData *data
QScriptValueList lst;
Set<Value *> oldNextChain = m_currentNextChain;
for (ValuePtr next = value; next; next = next->next())
- m_currentNextChain.insert(next.data());
+ m_currentNextChain.insert(next.get());
for (ValuePtr next = value; next; next = next->next()) {
QScriptValue v = data->evaluator->property(next->definingItem(), propertyName);
@@ -406,7 +406,7 @@ void EvaluatorScriptClass::collectValuesFromNextChain(const EvaluationData *data
continue;
lst << v;
if (next->type() == Value::JSSourceValueType
- && next.staticCast<JSSourceValue>()->isExclusiveListValue()) {
+ && std::static_pointer_cast<JSSourceValue>(next)->isExclusiveListValue()) {
lst = lst.mid(lst.length() - 2);
break;
}
@@ -589,7 +589,7 @@ QScriptValue EvaluatorScriptClass::property(const QScriptValue &object, const QS
if (debugProperties)
qDebug() << "[SC] property " << name;
- PropertyStackManager propStackmanager(itemOfProperty, name, value.data(),
+ PropertyStackManager propStackmanager(itemOfProperty, name, value.get(),
m_requestedProperties, m_propertyDependencies);
QScriptValue result;
@@ -602,14 +602,14 @@ QScriptValue EvaluatorScriptClass::property(const QScriptValue &object, const QS
}
}
- if (value->next() && !m_currentNextChain.contains(value.data())) {
+ if (value->next() && !m_currentNextChain.contains(value.get())) {
collectValuesFromNextChain(data, &result, name.toString(), value);
} else {
SVConverter converter(this, &object, value, itemOfProperty, &name, data, &result);
converter.start();
const PropertyDeclaration decl = data->item->propertyDeclaration(name.toString());
- convertToPropertyType(data->item, decl, value.data(), result);
+ convertToPropertyType(data->item, decl, value.get(), result);
}
if (debugProperties)