From 3578e05b293c1cc53582109001b20f02c7a1eeb7 Mon Sep 17 00:00:00 2001 From: Giuseppe D'Angelo Date: Mon, 30 Jan 2012 00:52:34 +0000 Subject: Merge QStyleOption*V{2,3,4} classes together In order to keep binary compatibility, Qt 4 introduced V{2,3,4} classes for QStyleOption subclasses. They're simple, low level containers for various members with public access (no accessors required). In Qt 5.0 we can break BC, so this patch moves the members from the derived classes into the ``base'' ones. The ``base'' ones get a version bump matching the highest version available, and the V{2,3,4} classes become typedefs. This change can cause problems in code that used QStyleOption directly, especially QStyleOptionViewItem, because the old V4 fields get default initialization but the QStyle subclasses detect that the option is a V4 option and expect all fields to be properly initialized. The fix in such places is to properly initialize all fields. Task-number: QTBUG-23522 Change-Id: I2f782da09ca5cc8c4cbafc07448fb0d33153a251 Reviewed-by: Lars Knoll --- dist/changes-5.0.0 | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'dist') diff --git a/dist/changes-5.0.0 b/dist/changes-5.0.0 index 14a9cbb084..d5e24c158e 100644 --- a/dist/changes-5.0.0 +++ b/dist/changes-5.0.0 @@ -269,6 +269,16 @@ QtWidgets * QInputDialog::getInteger() has been obsoleted. Use QInputDialog::getInt() instead. +* In Qt 4, many QStyleOption subclasses were introduced in order to keep + binary compatibility -- QStyleOption was designed to be extended this way, + in fact it embeds a version number. In Qt 5 the various QStyleOption*V{2,3,4} + classes have been removed, and their members merged into the respective + base classes. Those classes were left as typedefs to keep existing code + working. Still, some minor adjustements could be necessary, especially in code + that uses QStyleOption directly and does not initialize all the members using + the proper Qt API: due to the version bump, QStyle will try to use the additional + QStyleOption members, which are left default-initialized. + QtNetwork --------- * QHostAddress::isLoopback() API added. Returns true if the address is -- cgit v1.2.3