From fed603fde515339ec520accefded211ac6f69982 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Abecasis?= Date: Wed, 4 Jan 2012 14:30:42 +0100 Subject: Ensure shared_null(s) are statically initialized on VS 2010 This removes const qualification on data members of QConst*Data, which was subjecting QString's and QByteArray's shared_null to the "order of static initialization fiasco", with up-to-date VS 2010. Furthermore, the const qualification in the places where it was removed had little meaning and no value. It was unnecessary. As such, "Const" was removed from the struct's names and "Static" used in its place, to imply their usefulness in supporting statically-initialized fixed-size (string and byte) containers. A test case was added to QArrayData as that is meant to replace both QStringData and QByteArrayData in the near future. VS issue reported at: https://connect.microsoft.com/VisualStudio/feedback/details/716461 Change-Id: I3d86f2a387a68f359bb3d8f4d10cf3da51c6ecf7 Reviewed-by: Thiago Macieira Reviewed-by: Olivier Goffart Reviewed-by: Bradley T. Hughes --- src/corelib/tools/qstringbuilder.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/corelib/tools/qstringbuilder.h') diff --git a/src/corelib/tools/qstringbuilder.h b/src/corelib/tools/qstringbuilder.h index 30b81c42f4..de6b655e95 100644 --- a/src/corelib/tools/qstringbuilder.h +++ b/src/corelib/tools/qstringbuilder.h @@ -249,9 +249,9 @@ template <> struct QConcatenable : private QAbstractConcatenable #endif }; -template struct QConcatenable > : private QAbstractConcatenable +template struct QConcatenable > : private QAbstractConcatenable { - typedef QConstStringDataPtr type; + typedef QStaticStringDataPtr type; typedef QString ConvertTo; enum { ExactSize = true }; static int size(const type &) { return N; } @@ -363,9 +363,9 @@ template <> struct QConcatenable : private QAbstractConcatenable } }; -template struct QConcatenable > : private QAbstractConcatenable +template struct QConcatenable > : private QAbstractConcatenable { - typedef QConstByteArrayDataPtr type; + typedef QStaticByteArrayDataPtr type; typedef QByteArray ConvertTo; enum { ExactSize = false }; static int size(const type &) { return N; } -- cgit v1.2.3