[Libreoffice-commits] core.git: vcl/qt5
Katarina Behrens (via logerrit)
logerrit at kemper.freedesktop.org
Tue Apr 30 08:09:14 UTC 2019
vcl/qt5/Qt5Frame.cxx | 1 +
vcl/qt5/Qt5Widget.cxx | 1 -
2 files changed, 1 insertion(+), 1 deletion(-)
New commits:
commit 6a67ecd9b12e68031b5dbacb591955b59f476b86
Author: Katarina Behrens <Katarina.Behrens at cib.de>
AuthorDate: Mon Apr 29 15:42:40 2019 +0200
Commit: Katarina Behrens <Katarina.Behrens at cib.de>
CommitDate: Tue Apr 30 10:08:09 2019 +0200
tdf#123859: only accept drops when drop target was registered
some hard to reliably reproduce crashes when drag'n'dropping slides
in slide sorter in Impress can be tracked down to null drop target.
Not every SalFrame is registered as drop target, so let's accept
drops (QWidget::setAcceptDrops) only for those frames that are.
Change-Id: I01f006d619209c558e8d9976116daad65f51d7d9
Reviewed-on: https://gerrit.libreoffice.org/71533
Tested-by: Jenkins
Reviewed-by: Katarina Behrens <Katarina.Behrens at cib.de>
diff --git a/vcl/qt5/Qt5Frame.cxx b/vcl/qt5/Qt5Frame.cxx
index 93c37f7a426f..b07ea360a1cc 100644
--- a/vcl/qt5/Qt5Frame.cxx
+++ b/vcl/qt5/Qt5Frame.cxx
@@ -1111,6 +1111,7 @@ void Qt5Frame::registerDropTarget(Qt5DropTarget* pDropTarget)
{
assert(!m_pDropTarget);
m_pDropTarget = pDropTarget;
+ m_pQWidget->setAcceptDrops(true);
}
void Qt5Frame::deregisterDropTarget(Qt5DropTarget const* pDropTarget)
diff --git a/vcl/qt5/Qt5Widget.cxx b/vcl/qt5/Qt5Widget.cxx
index c04564a75e06..f2c574a99655 100644
--- a/vcl/qt5/Qt5Widget.cxx
+++ b/vcl/qt5/Qt5Widget.cxx
@@ -446,7 +446,6 @@ Qt5Widget::Qt5Widget(Qt5Frame& rFrame, Qt::WindowFlags f)
{
create();
setMouseTracking(true);
- setAcceptDrops(true);
setFocusPolicy(Qt::StrongFocus);
}
More information about the Libreoffice-commits
mailing list