Package: libreoffice / 1:6.1.5-3

tdf123077.diff Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
From f8bef86cc88e99b32e223b2bd675959c6d8e46ad Mon Sep 17 00:00:00 2001
From: Michael Weghorn <m.weghorn@posteo.de>
Date: Thu, 31 Jan 2019 09:52:51 +0100
Subject: tdf#123077 gtk3_kde5: Set KFileWidget's custom widget only once

Since the event filter is only used to set the custom
widget in the KFileWidget, it can and needs to be removed
again once this has been done; which also avoids crashes.

(s. https://gerrit.libreoffice.org/#/c/67185/ for more
infos, where the same thing is done for kde5)

Change-Id: I5c719fb17510916b4730ed5c00bb638df2f183e3
Reviewed-on: https://gerrit.libreoffice.org/67184
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
(cherry picked from commit 30cc54a4532a732a0cf6dfe9943521978ff7292f)
Reviewed-on: https://gerrit.libreoffice.org/67204
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
---
 vcl/unx/gtk3_kde5/kde5_filepicker.cxx | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/vcl/unx/gtk3_kde5/kde5_filepicker.cxx b/vcl/unx/gtk3_kde5/kde5_filepicker.cxx
index 42e278a..804aaa6 100644
--- a/vcl/unx/gtk3_kde5/kde5_filepicker.cxx
+++ b/vcl/unx/gtk3_kde5/kde5_filepicker.cxx
@@ -241,7 +241,11 @@ bool KDE5FilePicker::eventFilter(QObject* o, QEvent* e)
         {
             KWindowSystem::setMainWindow(w, _winId);
             if (auto* fileWidget = w->findChild<KFileWidget*>({}, Qt::FindDirectChildrenOnly))
+            {
                 fileWidget->setCustomWidget(_extraControls);
+                // remove event filter again; the only purpose was to set the custom widget here
+                qApp->removeEventFilter(this);
+            }
         }
     }
     return QObject::eventFilter(o, e);
-- 
cgit v1.1