[Libreoffice-commits] core.git: vcl/unx
Julien Nabet (via logerrit)
logerrit at kemper.freedesktop.org
Fri Sep 27 21:36:20 UTC 2019
vcl/unx/gtk3_kde5/kde5_filepicker.cxx | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
New commits:
commit 94e22f5a2fcc9f193ce0370805156ad5320d4141
Author: Julien Nabet <serval2412 at yahoo.fr>
AuthorDate: Fri Sep 27 19:44:41 2019 +0200
Commit: Julien Nabet <serval2412 at yahoo.fr>
CommitDate: Fri Sep 27 23:34:49 2019 +0200
KWINDOWSYSTEM_DEPRECATED static void setMainWindow
/home/julien/lo/libreoffice/vcl/unx/gtk3_kde5/kde5_filepicker.cxx: In member function ‘virtual bool KDE5FilePicker::eventFilter(QObject*, QEvent*)’:
/home/julien/lo/libreoffice/vcl/unx/gtk3_kde5/kde5_filepicker.cxx:271:51: error: ‘static void KWindowSystem::setMainWindow(QWidget*, WId)’ is deprecated [-Werror=deprecated-declarations]
271 | KWindowSystem::setMainWindow(w, _winId);
| ^
In file included from /usr/include/KF5/KWindowSystem/KWindowSystem:1,
from /home/julien/lo/libreoffice/vcl/unx/gtk3_kde5/kde5_filepicker.cxx:24:
/usr/include/KF5/KWindowSystem/kwindowsystem.h:255:42: note: declared here
255 | KWINDOWSYSTEM_DEPRECATED static void setMainWindow(QWidget *subwindow, WId mainwindow);
| ^~~~~~~~~~~~~
Change-Id: I6c8d4277b06d503b402042fbf234e9300db423c5
Reviewed-on: https://gerrit.libreoffice.org/79751
Reviewed-by: Michael Weghorn <m.weghorn at posteo.de>
Tested-by: Julien Nabet <serval2412 at yahoo.fr>
diff --git a/vcl/unx/gtk3_kde5/kde5_filepicker.cxx b/vcl/unx/gtk3_kde5/kde5_filepicker.cxx
index a3c2ecf63483..0138a9cbb5d6 100644
--- a/vcl/unx/gtk3_kde5/kde5_filepicker.cxx
+++ b/vcl/unx/gtk3_kde5/kde5_filepicker.cxx
@@ -268,7 +268,8 @@ bool KDE5FilePicker::eventFilter(QObject* o, QEvent* e)
auto* w = static_cast<QWidget*>(o);
if (!w->parentWidget() && w->isModal())
{
- KWindowSystem::setMainWindow(w, _winId);
+ w->setAttribute(Qt::WA_NativeWindow, true);
+ KWindowSystem::setMainWindow(w->windowHandle(), _winId);
if (auto* fileWidget = w->findChild<KFileWidget*>({}, Qt::FindDirectChildrenOnly))
{
fileWidget->setCustomWidget(_extraControls);
More information about the Libreoffice-commits
mailing list