Use StringRef::load() to initialize DefaultProperty string
authorKent Hansen <kent.hansen@nokia.com>
Mon, 5 Mar 2012 11:58:50 +0000 (12:58 +0100)
committerQt by Nokia <qt-info@nokia.com>
Wed, 7 Mar 2012 11:10:43 +0000 (12:10 +0100)
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 <aaron.kennedy@nokia.com>
src/qml/qml/qqmlcompiler.cpp

index 1ae8240..9304a75 100644 (file)
@@ -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)) {