1
0
forked from pool/libqt5-qtbase

Accepting request 619726 from KDE:Qt5

- Revert upstream commit to avoid regressions (kde#395988):
  * 0001-Revert-QWidgetWindow-Immediately-forward-close-event.patch

OBS-URL: https://build.opensuse.org/request/show/619726
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/libqt5-qtbase?expand=0&rev=84
This commit is contained in:
Dominique Leuenberger 2018-07-01 19:24:30 +00:00 committed by Git OBS Bridge
parent 89dc4266b9
commit 6dfaa29f79
3 changed files with 83 additions and 0 deletions

View File

@ -0,0 +1,75 @@
From fa9728f19c8bf8ae925a1c99d056559b7bc84515 Mon Sep 17 00:00:00 2001
From: Fabian Vogt <fabian@ritter-vogt.de>
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<QCloseEvent *>(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

View File

@ -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

View File

@ -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