From: Kent Hansen Date: Mon, 5 Mar 2012 11:58:50 +0000 (+0100) Subject: Use StringRef::load() to initialize DefaultProperty string X-Git-Tag: qt-v5.0.0-alpha1~220 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ee9cac7c3ad25e1e54286bb1b307bd3373383263;p=profile%2Fivi%2Fqtdeclarative.git Use StringRef::load() to initialize DefaultProperty string Micro-cleanup; don't access the string data directly. load() is inline. It additionally asserts that the string length matches. Change-Id: Ie24df83ea68b96179792995d062db7872933b1a8 Reviewed-by: Aaron Kennedy --- diff --git a/src/qml/qml/qqmlcompiler.cpp b/src/qml/qml/qqmlcompiler.cpp index 1ae8240..9304a75 100644 --- a/src/qml/qml/qqmlcompiler.cpp +++ b/src/qml/qml/qqmlcompiler.cpp @@ -3103,7 +3103,7 @@ bool QQmlCompiler::buildDynamicMeta(QQmlScript::Object *obj, DynamicMetaMode mod // Allocate default property if necessary if (defaultProperty) - strcpy(defPropRef.data(), "DefaultProperty"); + defPropRef.load("DefaultProperty"); // Now allocate signals for (Object::DynamicSignal *s = obj->dynamicSignals.first(); s; s = obj->dynamicSignals.next(s)) {