From c74799fa596c5392b6064eeec40f44118fd037fa Mon Sep 17 00:00:00 2001 From: Andy Shaw Date: Thu, 4 Jun 2020 11:51:42 +0200 Subject: [PATCH 1/4] Update the qt_attribution.json for SQLite This got forgotten when SQLite was upgraded to v3.32.1, so this amends e10e989ce83027f2f620bb6948be4948f3c91e76 Change-Id: I75799b6c55bc39c4cc050b5eb18a99d9f197410c Reviewed-by: Volker Hilsheimer (cherry picked from commit 542e7da817b1b0204ab6e8fdac802949e161cce5) Reviewed-by: Qt Cherry-pick Bot --- src/3rdparty/sqlite/qt_attribution.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/3rdparty/sqlite/qt_attribution.json b/src/3rdparty/sqlite/qt_attribution.json index e60605a5e87..8d079b3bc1a 100644 --- a/src/3rdparty/sqlite/qt_attribution.json +++ b/src/3rdparty/sqlite/qt_attribution.json @@ -6,8 +6,8 @@ "Description": "SQLite is a small C library that implements a self-contained, embeddable, zero-configuration SQL database engine.", "Homepage": "https://www.sqlite.org/", - "Version": "3.31.1", - "DownloadLocation": "https://www.sqlite.org/2020/sqlite-amalgamation-3310100.zip", + "Version": "3.32.1", + "DownloadLocation": "https://www.sqlite.org/2020/sqlite-amalgamation-3320100.zip", "License": "Public Domain", "Copyright": "The authors disclaim copyright to the source code. However, a license can be obtained if needed." } From f7f5919558a08e92db133580fff7b5cc3053a9ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Fri, 5 Jun 2020 12:50:43 +0200 Subject: [PATCH 2/4] macOS: Respect window type when determining main window status Fixes: QTBUG-84405 Change-Id: I3fc6b15b07a81e7e7e417a5767c2853083c13516 Reviewed-by: Timur Pocheptsov (cherry picked from commit 1cd7cbf6179692fc824dc3ba15580372493a4355) Reviewed-by: Jani Heikkinen --- src/plugins/platforms/cocoa/qnswindow.mm | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/plugins/platforms/cocoa/qnswindow.mm b/src/plugins/platforms/cocoa/qnswindow.mm index 6b4e110af27..1a74fd73f86 100644 --- a/src/plugins/platforms/cocoa/qnswindow.mm +++ b/src/plugins/platforms/cocoa/qnswindow.mm @@ -227,14 +227,12 @@ static bool isMouseEvent(NSEvent *ev) - (BOOL)canBecomeMainWindow { - BOOL canBecomeMain = YES; // By default, windows can become the main window - // Windows with a transient parent (such as combobox popup windows) // cannot become the main window: if (!m_platformWindow || m_platformWindow->window()->transientParent()) - canBecomeMain = NO; + return NO; - return canBecomeMain; + return [super canBecomeMainWindow]; } - (BOOL)worksWhenModal From 1e42f022cc763a7fa67887bee078d37faa6c4a86 Mon Sep 17 00:00:00 2001 From: Miika Pernu Date: Thu, 14 May 2020 15:26:51 +0300 Subject: [PATCH 3/4] Fix to crash in QWindow::event when delete this called on closeEvent Starting from Qt 5.11 QWindow::event is called after QDialog::closeEvent which would cause a crash if "delete this" was called on closeEvent. The commit that changed this was e0b5ff4ad583befbecbcbe462998e3ed80899531. Added a check before QWindow::event call utilizing QPointer to prevent the function call in case object is destroyed by a user in close event handler. Change-Id: I64a4a0f3271714e55bf7e806177f0d8b39b67fa3 Fixes: QTBUG-84222 Reviewed-by: Volker Hilsheimer (cherry picked from commit 036c3c19e7da5f1a280750d3c68a0cff38678029) (cherry picked from commit 710777d5d32ef13f2037cfe58e40ff2343355759) Reviewed-by: Qt Cherry-pick Bot --- src/widgets/kernel/qwidgetwindow.cpp | 8 ++++++-- .../widgets/kernel/qwidget/tst_qwidget.cpp | 20 +++++++++++++++++++ 2 files changed, 26 insertions(+), 2 deletions(-) diff --git a/src/widgets/kernel/qwidgetwindow.cpp b/src/widgets/kernel/qwidgetwindow.cpp index c3f570ce4fb..e74243203a5 100644 --- a/src/widgets/kernel/qwidgetwindow.cpp +++ b/src/widgets/kernel/qwidgetwindow.cpp @@ -243,10 +243,14 @@ bool QWidgetWindow::event(QEvent *event) } switch (event->type()) { - case QEvent::Close: + case QEvent::Close: { + // The widget might be deleted in the close event handler. + QPointer guard = this; handleCloseEvent(static_cast(event)); - QWindow::event(event); + if (guard) + QWindow::event(event); return true; + } case QEvent::Enter: case QEvent::Leave: diff --git a/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp b/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp index 788e005939e..9d2ed2e14e3 100644 --- a/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp +++ b/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp @@ -399,6 +399,8 @@ private slots: void closeEvent(); void closeWithChildWindow(); + void deleteWindowInCloseEvent(); + private: bool ensureScreenSize(int width, int height); @@ -11144,5 +11146,23 @@ void tst_QWidget::closeWithChildWindow() QVERIFY(!childWidget->isVisible()); } +class DeleteOnCloseEventWidget : public QWidget +{ +protected: + virtual void closeEvent(QCloseEvent *e) override + { + e->accept(); + delete this; + } +}; + +void tst_QWidget::deleteWindowInCloseEvent() +{ + // Just checking if closing this widget causes a crash + auto widget = new DeleteOnCloseEventWidget; + widget->close(); + QVERIFY(true); +} + QTEST_MAIN(tst_QWidget) #include "tst_qwidget.moc" From 823ed71e220ebde07970dd61c04bb47b01dd06c4 Mon Sep 17 00:00:00 2001 From: Antti Kokko Date: Wed, 3 Jun 2020 13:51:20 +0300 Subject: [PATCH 4/4] Add changes file for Qt 5.12.9 Change-Id: I8dfebce4f5fa0eb888feed599f89759511b3fc34 Reviewed-by: Lars Knoll --- dist/changes-5.12.9 | 95 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 95 insertions(+) create mode 100644 dist/changes-5.12.9 diff --git a/dist/changes-5.12.9 b/dist/changes-5.12.9 new file mode 100644 index 00000000000..7d5b7443776 --- /dev/null +++ b/dist/changes-5.12.9 @@ -0,0 +1,95 @@ +Qt 5.12.9 is a bug-fix release. It maintains both forward and backward +compatibility (source and binary) with Qt 5.12.0 through 5.12.8. + +For more details, refer to the online documentation included in this +distribution. The documentation is also available online: + +https://doc.qt.io/qt-5/index.html + +The Qt version 5.12 series is binary compatible with the 5.11.x series. +Applications compiled for 5.11 will continue to run with 5.12. + +Some of the changes listed in this file include issue tracking numbers +corresponding to tasks in the Qt Bug Tracker: + +https://bugreports.qt.io/ + +Each of these identifiers can be entered in the bug tracker to obtain more +information about a particular change. + +**************************************************************************** +* Platform-specific Changes * +**************************************************************************** + +Linux +----- + + - [QTBUG-63584] Fixed a crash in evdev when multiple touchscreens are in use. + +Windows +------- + + - Fixed a compatibility issue found when linking code compiled with + MSVC version 16.6 to a Qt compiled with 16.5. + - [QTBUG-80436] Fixed a crash when changing screen during session lock. + - [QTBUG-84265] Direct Write Font engine: Fix a memory leak + +macOS +----- + + - [QTBUG-84405] Respect window type when determining main window status + +**************************************************************************** +* QtCore * +**************************************************************************** + + - QCborValue: + * fromCbor() now limits decoding to at most 1024 nested maps, arrays, + and tags to prevent stack overflows. This should be sufficient for + most uses of CBOR. An API to limit further or to relax the limit will + be provided in 5.15. Meanwhile, if decoding more is required, + QCborStreamReader can be used (note that each level of map and array + allocates memory). + +**************************************************************************** +* QtSQL * +**************************************************************************** + + - sqlite: + * Updated to v3.32.1 which includes fixes for CVE-2020-11655 and + CVE-2020-11656 + +**************************************************************************** +* QtNetwork * +**************************************************************************** + + - [QTBUG-83450] OpenSSL: handle SSL_shutdown's errors properly + +**************************************************************************** +* QtGui * +**************************************************************************** + + - QIcon: + * [QTBUG-74252] If you call QIcon::setFallbackThemeName(), do it before + creating a QGuiApplication. We fixed a race condition which was + preventing loading the first icon from the fallback theme. + + - QImage: + * [oss-fuzz 22557] Fixed undefined behavior in bmp/ico decoder + * [oss-fuzz 22741] Fixed crash in gif decoder + + - [QTBUG-84189] Avoid format conversion when uploading textures for the + backing store + +**************************************************************************** +* QtWidgets * +**************************************************************************** + + - QWidgetWindow: + * [QTBUG-84222] Fixed crash in QWidgetWindow::event() when + handling closeEvent. + + - QMenu: + * [QTBUG-76162] A submenu now always opens on the same screen as + the parent menu. +