Hello community, here is the log from the commit of package messagelib for openSUSE:Factory checked in at 2018-06-22 13:26:12 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/messagelib (Old) and /work/SRC/openSUSE:Factory/.messagelib.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "messagelib" Fri Jun 22 13:26:12 2018 rev:32 rq:616846 version:18.04.2 Changes: -------- --- /work/SRC/openSUSE:Factory/messagelib/messagelib.changes 2018-06-13 15:27:16.019338102 +0200 +++ /work/SRC/openSUSE:Factory/.messagelib.new/messagelib.changes 2018-06-22 13:26:14.502923647 +0200 @@ -1,0 +2,6 @@ +Thu Jun 14 11:04:43 UTC 2018 - [email protected] + +- Add upstream patch 0001-Fix-dnd-attachment-with-qt5.11.patch: + * Fixes drag-and-drop of attachments between message windows + +------------------------------------------------------------------- New: ---- 0001-Fix-dnd-attachment-with-qt5.11.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ messagelib.spec ++++++ --- /var/tmp/diff_new_pack.yd7u5r/_old 2018-06-22 13:26:15.414889944 +0200 +++ /var/tmp/diff_new_pack.yd7u5r/_new 2018-06-22 13:26:15.414889944 +0200 @@ -29,6 +29,7 @@ Group: System/Libraries Url: http://www.kde.org Source0: %{name}-%{version}.tar.xz +Patch0: 0001-Fix-dnd-attachment-with-qt5.11.patch BuildRequires: akonadi-contact-devel BuildRequires: akonadi-mime-devel BuildRequires: akonadi-search-devel @@ -117,6 +118,7 @@ %prep %setup -q +%autopatch -p1 %build %cmake_kf5 -d build -- -DMESSAGEVIEWER_USE_QTWEBENGINE=TRUE -DQTWEBENGINE_SUPPORT_OPTION=TRUE ++++++ 0001-Fix-dnd-attachment-with-qt5.11.patch ++++++ >From fe7ac5b4d9112d75115420a0d22dedb900a8f3d2 Mon Sep 17 00:00:00 2001 From: Laurent Montel <[email protected]> Date: Wed, 13 Jun 2018 13:18:51 +0200 Subject: [PATCH] Fix dnd attachment with qt5.11 Bug reported by David --- webengineviewer/src/webengineview.cpp | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/webengineviewer/src/webengineview.cpp b/webengineviewer/src/webengineview.cpp index 78a0e3f8..a314aed5 100644 --- a/webengineviewer/src/webengineview.cpp +++ b/webengineviewer/src/webengineview.cpp @@ -166,13 +166,19 @@ void WebEngineView::forwardMouseReleaseEvent(QMouseEvent *event) bool WebEngineView::eventFilter(QObject *obj, QEvent *event) { + // Keyboard events are sent to parent widget + if (obj == this && event->type() == QEvent::ParentChange && parentWidget()) { + parentWidget()->installEventFilter(this); + } + // Hack to find widget that receives input events if (obj == this && event->type() == QEvent::ChildAdded) { - QWidget *child = dynamic_cast<QWidget *>(static_cast<QChildEvent *>(event)->child()); - if (child && child->inherits("QtWebEngineCore::RenderWidgetHostViewQtDelegateWidget")) { - d->mCurrentWidget = child; - d->mCurrentWidget->installEventFilter(this); - } + QTimer::singleShot(0, this, [this]() { + if (focusProxy() && d->mCurrentWidget != focusProxy()) { + d->mCurrentWidget = focusProxy(); + d->mCurrentWidget->installEventFilter(this); + } + }); } // Forward events to WebEngineView -- 2.17.1
