diff options
author | Julien Nabet <serval2412@yahoo.fr> | 2019-09-27 19:44:41 +0200 |
---|---|---|
committer | Julien Nabet <serval2412@yahoo.fr> | 2019-09-27 23:34:49 +0200 |
commit | 94e22f5a2fcc9f193ce0370805156ad5320d4141 (patch) | |
tree | ca8a148e70678aaff0b2ee45785387c7a348cff8 | |
parent | 77a21b35c3dc1e2bd2ec7e18d82da88d876178ed (diff) |
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@posteo.de>
Tested-by: Julien Nabet <serval2412@yahoo.fr>
-rw-r--r-- | vcl/unx/gtk3_kde5/kde5_filepicker.cxx | 3 |
1 files changed, 2 insertions, 1 deletions
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); |