diff options
author | João Abecasis <joao.abecasis@nokia.com> | 2012-04-03 13:23:55 +0200 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-04-04 23:29:52 +0200 |
commit | 4c892e14c6929e174c8bccc9ec5693a63a8ce69c (patch) | |
tree | c8e08cd6dc541fd122f395ea2c74f8733f31fc63 /src/corelib/tools/qstring.cpp | |
parent | a959f34d716f42925b22d42838e7a4b97e415c69 (diff) |
Introduce initializer macros for QString- and QByteArrayData
This enables easier updating of those structs, by reducing the amount of
code that needs to be fixed. The common (and known) use cases are
covered by the two macros being introduced in each case.
Change-Id: I44981ca9b9b034f99238a11797b30bb85471cfb7
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/tools/qstring.cpp')
-rw-r--r-- | src/corelib/tools/qstring.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/corelib/tools/qstring.cpp b/src/corelib/tools/qstring.cpp index 3bd2deee66..6935c76b42 100644 --- a/src/corelib/tools/qstring.cpp +++ b/src/corelib/tools/qstring.cpp @@ -796,8 +796,8 @@ const QString::Null QString::null = { }; \sa split() */ -const QStaticStringData<1> QString::shared_null = { { Q_REFCOUNT_INITIALIZE_STATIC, 0, 0, false, sizeof(QStringData) }, { 0 } }; -const QStaticStringData<1> QString::shared_empty = { { Q_REFCOUNT_INITIALIZE_STATIC, 0, 0, false, sizeof(QStringData) }, { 0 } }; +const QStaticStringData<1> QString::shared_null = { Q_STATIC_STRING_DATA_HEADER_INITIALIZER(0), { 0 } }; +const QStaticStringData<1> QString::shared_empty = { Q_STATIC_STRING_DATA_HEADER_INITIALIZER(0), { 0 } }; int QString::grow(int size) { |