[Libreoffice-commits] core.git: Branch 'libreoffice-6-3' - vcl/qt5
Michael Weghorn (via logerrit)
logerrit at kemper.freedesktop.org
Mon Feb 10 07:13:34 UTC 2020
vcl/qt5/Qt5Transferable.cxx | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
New commits:
commit 966a02f2152528bef2e3ea75e8ac1a955dc897cc
Author: Michael Weghorn <m.weghorn at posteo.de>
AuthorDate: Fri Feb 7 13:49:45 2020 +0100
Commit: Adolfo Jayme Barrientos <fitojb at ubuntu.com>
CommitDate: Mon Feb 10 08:13:06 2020 +0100
tdf#129809 qt5: take a reference in case m_aContents is replaced
This takes over Caolán's solution for gtk3 from
dbcdc5cd98df5756a96559e467cad95c629343ca
("tdf#129809 take a reference in case m_aContents is replaced")
for the qt5 case as well, to prevent that the XTransferable
is destroyed along with the Qt5MimeData object as new QMimeData
are set in the clipboard, as follows:
1 Qt5Clipboard::setContents Qt5Clipboard.cxx
2 TransferableHelper::CopyToSelection transfer.cxx
3 TransferableHelper::CopyToSelection transfer.cxx
4 SwTransferable::CreateSelection swdtflvr.cxx
5 SwWrtShell::SttSelect select.cxx
6 SwWrtShell::SelectTextAttr move.cxx
7 SwTransferable::GetData swdtflvr.cxx
8 TransferableHelper::getTransferData2 transfer.cxx
9 TransferableHelper::getTransferData transfer.cxx
10 Qt5MimeData::retrieveData Qt5Transferable.cxx
11 QMimeDataPrivate::retrieveTypedData qvariant.h
12 QMimeData::data qmimedata.cpp
13 QInternalMimeData::renderDataHelper(QString const&, QMimeData const *)
14 ??
15 ??
16 ??
17 QXcbConnection::handleXcbEvent(xcb_generic_event_t *)
18 QXcbConnection::processXcbEvents(QFlags<QEventLoop::ProcessEventsFlag>)
19 ??
20 g_main_context_dispatch
Change-Id: Ic712c901a31131efc596cac7f00f14bb6a7ce068
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88192
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn at posteo.de>
(cherry picked from commit 1d7b1a15059a77fde9afa14d0b9a508142bfc247)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88259
Reviewed-by: Adolfo Jayme Barrientos <fitojb at ubuntu.com>
diff --git a/vcl/qt5/Qt5Transferable.cxx b/vcl/qt5/Qt5Transferable.cxx
index 10a139093041..66ea1dc3300b 100644
--- a/vcl/qt5/Qt5Transferable.cxx
+++ b/vcl/qt5/Qt5Transferable.cxx
@@ -300,7 +300,10 @@ QVariant Qt5MimeData::retrieveData(const QString& mimeType, QVariant::Type) cons
try
{
- aValue = m_aContents->getTransferData(aFlavor);
+ // tdf#129809 take a reference in case m_aContents is replaced during this call
+ css::uno::Reference<com::sun::star::datatransfer::XTransferable> xCurrentContents(
+ m_aContents);
+ aValue = xCurrentContents->getTransferData(aFlavor);
}
catch (...)
{
More information about the Libreoffice-commits
mailing list