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

Eda Nur Var (via logerrit) logerrit at kemper.freedesktop.org
Mon Feb 3 08:55:51 UTC 2020


 vcl/unx/gtk3_kde5/kde5_filepicker.cxx |    2 +-
 vcl/unx/gtk3_kde5/kde5_filepicker.hxx |    4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

New commits:
commit b16faa4dcd87b9c7203b230a9feaebbb05c5a9cb
Author:     Eda Nur Var <var.eda.nur at gmail.com>
AuthorDate: Mon Jan 27 01:49:02 2020 +0300
Commit:     Thorsten Behrens <Thorsten.Behrens at CIB.de>
CommitDate: Mon Feb 3 09:55:17 2020 +0100

    tdf#75280 Convert inappropriate use of sal_uIntPtr to better integer types
    
    Since KDE is a desktop environment, I have infered that the class which the _winId variable belongs to makes user interaction, such as file picking from a window, possible. I have checked related functions and seen that winId is the id number of windows on the screen and the window whose Id is defined as 0 is avaliable to user interaction. Hence _winId could be an integer type instead of a pointer.
    
    Change-Id: I98897e55342630e3a0e8b98fc081e14541621ae2
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87469
    Reviewed-by: Milian Wolff <milian.wolff at kdab.com>
    Tested-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>

diff --git a/vcl/unx/gtk3_kde5/kde5_filepicker.cxx b/vcl/unx/gtk3_kde5/kde5_filepicker.cxx
index 27043053c3da..65953e4f2763 100644
--- a/vcl/unx/gtk3_kde5/kde5_filepicker.cxx
+++ b/vcl/unx/gtk3_kde5/kde5_filepicker.cxx
@@ -237,7 +237,7 @@ void KDE5FilePicker::initialize(bool saveDialog)
     }
 }
 
-void KDE5FilePicker::setWinId(sal_uIntPtr winId) { _winId = winId; }
+void KDE5FilePicker::setWinId(sal_uInt64 winId) { _winId = winId; }
 
 void KDE5FilePicker::setupCustomWidgets()
 {
diff --git a/vcl/unx/gtk3_kde5/kde5_filepicker.hxx b/vcl/unx/gtk3_kde5/kde5_filepicker.hxx
index 0442c333ab05..74f94d222115 100644
--- a/vcl/unx/gtk3_kde5/kde5_filepicker.hxx
+++ b/vcl/unx/gtk3_kde5/kde5_filepicker.hxx
@@ -53,7 +53,7 @@ protected:
     //layout for extra custom controls
     QGridLayout* _layout;
 
-    sal_uIntPtr _winId;
+    sal_uInt64 _winId;
 
 public:
     explicit KDE5FilePicker(QObject* parent = nullptr);
@@ -92,7 +92,7 @@ public:
     //add a custom control widget to the file dialog
     void addCheckBox(sal_Int16 nControlId, const QString& label, bool hidden);
 
-    void setWinId(sal_uIntPtr winId);
+    void setWinId(sal_uInt64 winId);
 
 private:
     Q_DISABLE_COPY(KDE5FilePicker)


More information about the Libreoffice-commits mailing list