diff --git a/0001-Revert-QWidgetWindow-Immediately-forward-close-event.patch b/0001-Revert-QWidgetWindow-Immediately-forward-close-event.patch new file mode 100644 index 0000000..b6acb2a --- /dev/null +++ b/0001-Revert-QWidgetWindow-Immediately-forward-close-event.patch @@ -0,0 +1,75 @@ +From fa9728f19c8bf8ae925a1c99d056559b7bc84515 Mon Sep 17 00:00:00 2001 +From: Fabian Vogt +Date: Fri, 29 Jun 2018 09:15:51 +0200 +Subject: [PATCH] Revert "QWidgetWindow: Immediately forward close events to + QWindow" + +This reverts commit e0b5ff4ad583befbecbcbe462998e3ed80899531. + +References: kde#395988 +References: QTBUG-43344 +--- + src/widgets/kernel/qwidgetwindow.cpp | 1 - + .../widgets/kernel/qwidget/tst_qwidget.cpp | 28 ------------------- + 2 files changed, 29 deletions(-) + +diff --git a/src/widgets/kernel/qwidgetwindow.cpp b/src/widgets/kernel/qwidgetwindow.cpp +index 1f3057b008..24e0173ac1 100644 +--- a/src/widgets/kernel/qwidgetwindow.cpp ++++ b/src/widgets/kernel/qwidgetwindow.cpp +@@ -237,7 +237,6 @@ bool QWidgetWindow::event(QEvent *event) + switch (event->type()) { + case QEvent::Close: + handleCloseEvent(static_cast(event)); +- QWindow::event(event); + return true; + + case QEvent::Enter: +diff --git a/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp b/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp +index 6a049aedf1..c7dab650fe 100644 +--- a/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp ++++ b/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp +@@ -401,8 +401,6 @@ private slots: + + void tabletTracking(); + +- void closeEvent(); +- + private: + bool ensureScreenSize(int width, int height); + +@@ -10800,31 +10798,5 @@ void tst_QWidget::tabletTracking() + QTRY_COMPARE(widget.moveEventCount, 3); + } + +-class CloseCountingWidget : public QWidget +-{ +-public: +- int closeCount = 0; +- void closeEvent(QCloseEvent *ev) override; +-}; +- +-void CloseCountingWidget::closeEvent(QCloseEvent *ev) +-{ +- ++closeCount; +- ev->accept(); +-} +- +-void tst_QWidget::closeEvent() +-{ +- CloseCountingWidget widget; +- widget.show(); +- QVERIFY(QTest::qWaitForWindowExposed(&widget)); +- // Yes we call the close() function twice. This mimics the behavior of QTBUG-43344 where +- // QApplication first closes all windows and then QCocoaApplication flushes window system +- // events, triggering more close events. +- widget.windowHandle()->close(); +- widget.windowHandle()->close(); +- QCOMPARE(widget.closeCount, 1); +-} +- + QTEST_MAIN(tst_QWidget) + #include "tst_qwidget.moc" +-- +2.17.1 + diff --git a/libqt5-qtbase.changes b/libqt5-qtbase.changes index fe5a903..47f7825 100644 --- a/libqt5-qtbase.changes +++ b/libqt5-qtbase.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Fri Jun 29 07:21:37 UTC 2018 - fabian@ritter-vogt.de + +- Revert upstream commit to avoid regressions (kde#395988): + * 0001-Revert-QWidgetWindow-Immediately-forward-close-event.patch + ------------------------------------------------------------------- Tue Jun 19 10:49:46 CEST 2018 - fabian@ritter-vogt.de diff --git a/libqt5-qtbase.spec b/libqt5-qtbase.spec index 864d5d2..b82a76a 100644 --- a/libqt5-qtbase.spec +++ b/libqt5-qtbase.spec @@ -63,6 +63,8 @@ Patch10: libqt5-prioritise-gtk2-platformtheme.patch # PATCH-FEATURE-OPENSUSE 0001-Add-remote-print-queue-support.patch fate#322052 -- Automatically recognize and allow printing to remote cups servers Patch12: 0001-Add-remote-print-queue-support.patch # PATCH-FIX-OPENSUSE +Patch13: 0001-Revert-QWidgetWindow-Immediately-forward-close-event.patch +# PATCH-FIX-OPENSUSE Patch16: 0001-Hack-together-a-way-to-get-fallback-from-xcb-working.patch # PATCH-FIX-UPSTREAM Patch17: qapplication-emit-palettechanged.patch