summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKatarina Behrens <Katarina.Behrens@cib.de>2019-04-29 15:42:40 +0200
committerThorsten Behrens <Thorsten.Behrens@CIB.de>2019-04-30 23:44:25 +0200
commit69582a4afcc2d8f0da602d319b5785609c0292ad (patch)
treea56d849d975533be17a93d749f18762071daf89a
parentc17588930688b01253434a3d8acb4b9c0c58adf7 (diff)
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@cib.de> (cherry picked from commit 6a67ecd9b12e68031b5dbacb591955b59f476b86) Reviewed-on: https://gerrit.libreoffice.org/71583 Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
-rw-r--r--vcl/qt5/Qt5Frame.cxx1
-rw-r--r--vcl/qt5/Qt5Widget.cxx1
2 files changed, 1 insertions, 1 deletions
diff --git a/vcl/qt5/Qt5Frame.cxx b/vcl/qt5/Qt5Frame.cxx
index b1ad0f93d561..62d3808ba572 100644
--- a/vcl/qt5/Qt5Frame.cxx
+++ b/vcl/qt5/Qt5Frame.cxx
@@ -1100,6 +1100,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 8f7cb8756c25..62fae3736247 100644
--- a/vcl/qt5/Qt5Widget.cxx
+++ b/vcl/qt5/Qt5Widget.cxx
@@ -445,7 +445,6 @@ Qt5Widget::Qt5Widget(Qt5Frame& rFrame, Qt::WindowFlags f)
{
create();
setMouseTracking(true);
- setAcceptDrops(true);
setFocusPolicy(Qt::StrongFocus);
}