From a6cdfacf8d9c646333e81693e73e2c74173ad29a Mon Sep 17 00:00:00 2001 From: Giuseppe D'Angelo Date: Wed, 18 Jan 2017 17:11:15 +0000 Subject: QHostAddress: make it implictly shared QHostAddress is one of the few classes in Qt which is pimpl'd but not implictly shared, making it suprisingly expensive to copy around, return by value and so on. Being pimpl'd it is also still lacking a move constructor, like most of such types in Qt. Remove a bit of the surprise factor and make it implictly shared. In practice this means making it eagerly parse host addresses from strings. Since it was entirely implemented out of line, replacing it with a implictly shared implementation is binary compatible. [ChangeLog][QtNetwork][QHostAddress] QHostAddress is now implicitly shared. Change-Id: Ia7ff94efcb74e7321b7607cd690c5c162f685605 Reviewed-by: Richard J. Moore --- src/corelib/global/qhooks.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/corelib/global/qhooks.cpp') diff --git a/src/corelib/global/qhooks.cpp b/src/corelib/global/qhooks.cpp index 7b9a3db30d..bbddb1cbf1 100644 --- a/src/corelib/global/qhooks.cpp +++ b/src/corelib/global/qhooks.cpp @@ -67,7 +67,7 @@ quintptr Q_CORE_EXPORT qtHookData[] = { // The required sizes and offsets are tested in tests/auto/other/toolsupport. // When this fails and the change was intentional, adjust the test and // adjust this value here. - 15 + 16 }; Q_STATIC_ASSERT(QHooks::LastHookIndex == sizeof(qtHookData) / sizeof(qtHookData[0])); -- cgit v1.2.3