From e9190eda1a2b16bd6aa07cce4e00f302eeb3562e Mon Sep 17 00:00:00 2001 From: Paul Wicking Date: Mon, 9 Sep 2019 10:43:27 +0200 Subject: Doc: Remove broken example snippet from Q_ENUMS The code snippet is used by both Q_ENUMS and Q_ENUM. Therefore, remove the example snippet from Q_ENUMS documentation, as it is obsolete. Also, move recommendation to use Q_ENUM in new code to the very top of Q_ENUMS' documentation. Fixes: QTBUG-63203 Change-Id: I12a9f45e0b3bd75dfe98e1ecbc45e299a688b80c Reviewed-by: Giuseppe D'Angelo --- src/corelib/kernel/qobject.cpp | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/src/corelib/kernel/qobject.cpp b/src/corelib/kernel/qobject.cpp index 1f5b61c978..598ce75bd4 100644 --- a/src/corelib/kernel/qobject.cpp +++ b/src/corelib/kernel/qobject.cpp @@ -4291,22 +4291,18 @@ QDebug operator<<(QDebug dbg, const QObject *o) \relates QObject \obsolete + In new code, you should prefer the use of the Q_ENUM() macro, which makes the + type available also to the meta type system. + For instance, QMetaEnum::fromType() will not work with types declared with Q_ENUMS(). + This macro registers one or several enum types to the meta-object system. - For example: - - \snippet code/src_corelib_kernel_qobject.cpp 38 - If you want to register an enum that is declared in another class, the enum must be fully qualified with the name of the class defining it. In addition, the class \e defining the enum has to inherit QObject as well as declare the enum using Q_ENUMS(). - In new code, you should prefer the use of the Q_ENUM() macro, which makes the - type available also to the meta type system. - For instance, QMetaEnum::fromType() will not work with types declared with Q_ENUMS(). - \sa {Qt's Property System} */ -- cgit v1.2.3 From 51f1428d3cd782c22226b0ee4bd7145a45762d86 Mon Sep 17 00:00:00 2001 From: Leena Miettinen Date: Thu, 19 Sep 2019 11:56:24 +0200 Subject: qmake: Replace WinRT with UWP in the qmake Manual Remove info about Windows Phone, which is no longer supported. Task-number: QTBUG-61884 Change-Id: Ic330f0f19a4e7314dd175f6c492fa25133185517 Reviewed-by: Oliver Wolff --- qmake/doc/src/qmake-manual.qdoc | 51 ++++++++++++++++++----------------------- 1 file changed, 22 insertions(+), 29 deletions(-) diff --git a/qmake/doc/src/qmake-manual.qdoc b/qmake/doc/src/qmake-manual.qdoc index b178084690..5e54278dd1 100644 --- a/qmake/doc/src/qmake-manual.qdoc +++ b/qmake/doc/src/qmake-manual.qdoc @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2017 The Qt Company Ltd. +** Copyright (C) 2019 The Qt Company Ltd. ** Contact: https://www.qt.io/licensing/ ** ** This file is part of the documentation of the Qt Toolkit. @@ -2891,8 +2891,8 @@ On desktop Windows, the default value is the value of the environment variable \c{WindowsSDKVersion}. - On WinRT, the default value is the value of the environment variable - \c{UCRTVERSION}. + On Universal Windows Platform (UWP), the default value is the value of the + environment variable \c{UCRTVERSION}. \target WINDOWS_TARGET_PLATFORM_MIN_VERSION \section1 WINDOWS_TARGET_PLATFORM_MIN_VERSION @@ -2905,8 +2905,8 @@ \target WINRT_MANIFEST \section1 WINRT_MANIFEST - Specifies parameters to be passed to the application manifest on \l{Qt for WinRT}{Windows - Runtime}. The allowed values are: + Specifies parameters to be passed to the application manifest on + \l{Qt for UWP}{UWP}. The allowed values are: \table \header @@ -2941,7 +2941,6 @@ \row \li foreground \li Tile foreground (text) color. Defaults to \c{light}. - This option is only available for Windows Store apps on Windows 8 and Windows RT. \row \li iconic_tile_icon \li Image file for the \c{iconic} tile template icon. Default provided by @@ -2956,16 +2955,16 @@ manifest's UUID, or generates a new UUID if none is present. \row \li logo_30x30 - \li Logo image file of size 30x30 pixels. This is not supported on Windows Phone. + \li Logo image file of size 30x30 pixels. \row \li logo_41x41 - \li Logo image file of size 41x41 pixels. This is only supported on Windows Phone. + \li Logo image file of size 41x41 pixels. This parameter is obsolete. \row \li logo_70x70 - \li Logo image file of size 70x70 pixels. This is not supported on Windows Phone. + \li Logo image file of size 70x70 pixels. \row \li logo_71x71 - \li Logo image file of size 71x71 pixels. This is only supported on Windows Phone. + \li Logo image file of size 71x71 pixels. This parameter is obsolete. \row \li logo_150x150 \li Logo image file of size 150x150 pixels. This is supported on all Windows @@ -2980,31 +2979,27 @@ Store App platforms. \row \li logo_620x300 - \li Splash screen image file of size 620x300 pixels. This is not supported on - Windows Phone. + \li Splash screen image file of size 620x300 pixels. \row \li logo_480x800 - \li Splash screen image file of size 480x800 pixels. This is only supported on - Windows Phone. + \li Splash screen image file of size 480x800 pixels. + This parameter is obsolete. \row \li logo_large \li Large logo image file. This has to be 150x150 pixels. Supported on all Windows Store App platforms. Default provided by the mkspec. \row \li logo_medium - \li Medium logo image file. For Windows Phone the image must have a pixel size - of 71x71, for other Windows Store App platforms 70x70. Default provided by - the mkspec. + \li Medium logo image file. The image must have a pixel size of 70x70. + Default provided by the mkspec. \row \li logo_small - \li Small logo image file. For Windows Phone the image must have a pixel size - of 44x44, for other Windows Store App platforms 30x30. Default provided by - the mkspec. + \li Small logo image file. The image must have a pixel size of 30x30. + Default provided by the mkspec. \row \li logo_splash - \li Splash screen image file. For Windows Phone the image must have a pixel size - of 480x800, for other Windows Store App platforms 620x300. Default provided - by the mkspec. + \li Splash screen image file. The image must have a pixel size of + 620x300. Default provided by the mkspec. \row \li logo_store \li Logo image file for Windows Store. Default provided by the mkspec. @@ -3017,10 +3012,12 @@ \li The name of the package as displayed to the user. Defaults to TARGET. \row \li phone_product_id - \li The GUID of the product. Defaults to the value of WINRT_MANIFEST.identity. (Windows Phone only) + \li The GUID of the product. + This parameter is obsolete. \row \li phone_publisher_id - \li The GUID of the publisher. Defaults to an invalid GUID. (Windows Phone only) + \li The GUID of the publisher. + This parameter is obsolete. \row \li publisher \li Display name of the publisher. Defaults to \c{Default publisher display name}. @@ -3071,10 +3068,6 @@ WINRT_MANIFEST.CONFIG += verbatim \endcode - \note The required image sizes of \e logo_small, \e logo_medium, and \e logo_large - depend on the target platform. The general descriptions are overwritten if a - description that specifies the size is provided. - \target YACCSOURCES \section1 YACCSOURCES -- cgit v1.2.3 From b8a911fbebfcd297ce08b91fbe85bb1624d257d9 Mon Sep 17 00:00:00 2001 From: Eirik Aavitsland Date: Wed, 11 Sep 2019 11:46:47 +0200 Subject: QPainter: Avoid leaking memory on unbalanced save/restore If a QPainter ended without all saved states having been restored, the state stack would leak memory. Fixes: QTBUG-77843 Change-Id: I760904d6391de24a4867be54fa1bebf76be14ba7 Reviewed-by: Allan Sandfeld Jensen --- src/gui/painting/qpainter.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/painting/qpainter.cpp b/src/gui/painting/qpainter.cpp index 95e6bda78b..f9e9563f10 100644 --- a/src/gui/painting/qpainter.cpp +++ b/src/gui/painting/qpainter.cpp @@ -1710,8 +1710,8 @@ void QPainter::restore() static inline void qt_cleanup_painter_state(QPainterPrivate *d) { + qDeleteAll(d->states); d->states.clear(); - delete d->state; d->state = 0; d->engine = 0; d->device = 0; -- cgit v1.2.3 From 9b6179cf957c32e0c02547d510dfee2088f02340 Mon Sep 17 00:00:00 2001 From: Andy Shaw Date: Thu, 5 Sep 2019 12:52:43 +0200 Subject: Ensure all children of a widget get updated when a stylesheet changes Before, only the direct children would get an update when the stylesheet changed, any children below that would be unchanged. Fixes: QTBUG-77006 Change-Id: Id668eaae74a8289d78d66644f077e6a3302960cd Reviewed-by: Frederik Gladhorn --- src/widgets/styles/qstylesheetstyle.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/widgets/styles/qstylesheetstyle.cpp b/src/widgets/styles/qstylesheetstyle.cpp index 85b65f39b1..98a9f74f5b 100644 --- a/src/widgets/styles/qstylesheetstyle.cpp +++ b/src/widgets/styles/qstylesheetstyle.cpp @@ -2735,6 +2735,11 @@ static void updateObjects(const QList& objects) if (auto widget = qobject_cast(const_cast(object))) { widget->style()->polish(widget); QApplication::sendEvent(widget, &event); + QList children; + children.reserve(widget->children().size() + 1); + for (auto child: qAsConst(widget->children())) + children.append(child); + updateObjects(children); } } } -- cgit v1.2.3 From ac5e198db4eea4670a5a4a22fb44eb8a6acc4c47 Mon Sep 17 00:00:00 2001 From: Andy Shaw Date: Sat, 21 Sep 2019 02:02:58 +0200 Subject: Add SQLite specific documentation when specifying a database name Fixes: QTBUG-67847 Change-Id: I3c640233526260b596e8224dc48f713a3f0cff56 Reviewed-by: Paul Wicking --- src/sql/kernel/qsqldatabase.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/sql/kernel/qsqldatabase.cpp b/src/sql/kernel/qsqldatabase.cpp index d63a9e59a8..f61c72285a 100644 --- a/src/sql/kernel/qsqldatabase.cpp +++ b/src/sql/kernel/qsqldatabase.cpp @@ -881,6 +881,14 @@ bool QSqlDatabase::rollback() connection name must be passed to addDatabase() at connection object create time. + For the QSQLITE driver, if the database name specified does not + exist, then it will create the file for you unless the + QSQLITE_OPEN_READONLY option is set. + + Additionally, \a name can be set to \c ":memory:" which will + create a temporary database which is only available for the + lifetime of the application. + For the QOCI (Oracle) driver, the database name is the TNS Service Name. -- cgit v1.2.3