From: Friedemann Kleint Date: Fri, 25 May 2012 10:01:31 +0000 (+0200) Subject: Fix warnings about truncation from size_t to int (MSVC2010/64bit). X-Git-Tag: 071012131707~280 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d37d5be8d224aaa478b648bf5cefa04277edf781;p=profile%2Fivi%2Fqtdeclarative.git Fix warnings about truncation from size_t to int (MSVC2010/64bit). Change-Id: I5e12f241484b497ae2bd79ea1cbde4913908bd20 Reviewed-by: Martin Jones --- diff --git a/src/qml/qml/qqml.h b/src/qml/qml/qqml.h index 9c01ee4..fedd0e4 100644 --- a/src/qml/qml/qqml.h +++ b/src/qml/qml/qqml.h @@ -91,12 +91,12 @@ class QQmlPropertyValueInterceptor; #define QML_GETTYPENAMES \ const char *className = T::staticMetaObject.className(); \ - int nameLen = strlen(className); \ + const int nameLen = int(strlen(className)); \ QVarLengthArray pointerName(nameLen+2); \ memcpy(pointerName.data(), className, nameLen); \ pointerName[nameLen] = '*'; \ pointerName[nameLen+1] = '\0'; \ - int listLen = strlen("QQmlListProperty<"); \ + const int listLen = int(strlen("QQmlListProperty<")); \ QVarLengthArray listName(listLen + nameLen + 2); \ memcpy(listName.data(), "QQmlListProperty<", listLen); \ memcpy(listName.data()+listLen, className, nameLen); \