[Libreoffice-commits] core.git: vcl/unx

Julien Nabet (via logerrit) logerrit at kemper.freedesktop.org
Sat Sep 28 10:57:43 UTC 2019


 vcl/unx/gtk3_kde5/kde5_filepicker.cxx |    7 +++++++
 1 file changed, 7 insertions(+)

New commits:
commit f453d2b0c7f27211d9c9061aa5c522cda37e37c6
Author:     Julien Nabet <serval2412 at yahoo.fr>
AuthorDate: Sat Sep 28 10:19:25 2019 +0200
Commit:     Julien Nabet <serval2412 at yahoo.fr>
CommitDate: Sat Sep 28 12:57:08 2019 +0200

    "KWINDOWSYSTEM_DEPRECATED static void setMainWindow" (take 2)
    
    /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);
          |                                      ^~~~~~~~~~~~~
    
    There's a new method we could use but it's only possible when baseline will include kwindowsystem >= 5.62
    
    Change-Id: Idd3dca98e15585077c20848613fce72c5daae0e2
    Reviewed-on: https://gerrit.libreoffice.org/79781
    Tested-by: Jenkins
    Reviewed-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..4fba409eb615 100644
--- a/vcl/unx/gtk3_kde5/kde5_filepicker.cxx
+++ b/vcl/unx/gtk3_kde5/kde5_filepicker.cxx
@@ -268,7 +268,14 @@ bool KDE5FilePicker::eventFilter(QObject* o, QEvent* e)
         auto* w = static_cast<QWidget*>(o);
         if (!w->parentWidget() && w->isModal())
         {
+            /*
+             To replace when baseline will include kwindowsystem >= 5.62 with:
+             w->setAttribute(Qt::WA_NativeWindow, true);
+             KWindowSystem::setMainWindow(w->windowHandle(), _winId);
+            */
+            SAL_WNODEPRECATED_DECLARATIONS_PUSH
             KWindowSystem::setMainWindow(w, _winId);
+            SAL_WNODEPRECATED_DECLARATIONS_POP
             if (auto* fileWidget = w->findChild<KFileWidget*>({}, Qt::FindDirectChildrenOnly))
             {
                 fileWidget->setCustomWidget(_extraControls);


More information about the Libreoffice-commits mailing list