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

Stephan Bergmann (via logerrit) logerrit at kemper.freedesktop.org
Thu Sep 26 05:03:56 UTC 2019


 vcl/unx/gtk/a11y/atkaction.cxx           |   10 +++++-----
 vcl/unx/gtk/a11y/atkimage.cxx            |    4 ++--
 vcl/unx/gtk/a11y/atktable.cxx            |    6 +++---
 vcl/unx/gtk/a11y/atkutil.cxx             |    4 ++--
 vcl/unx/gtk/a11y/atkwrapper.cxx          |    4 ++--
 vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx |    2 +-
 6 files changed, 15 insertions(+), 15 deletions(-)

New commits:
commit f5bbb2db98fe420174328e6c8e2f3d160a9b7758
Author:     Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Wed Sep 25 21:09:39 2019 +0200
Commit:     Stephan Bergmann <sbergman at redhat.com>
CommitDate: Thu Sep 26 07:02:55 2019 +0200

    Clean up uses of deprecated G_CONST_RETURN
    
    ...where /usr/include/glib-2.0/glib/gmacros.h from
    glib2-devel-2.62.0-1.fc31.x86_64 now has
    
      #define G_CONST_RETURN const GLIB_DEPRECATED_MACRO_IN_2_30_FOR(const)
    
    causing an "error: const [-Werror]" warning/error.
    
    (Cleaning up also vcl/unx/gtk/a11y/atkutil.cxx where the warnings were
    suppressed by the
    
      #define GLIB_DISABLE_DEPRECATION_WARNINGS
    
    in vcl/inc/unx/gtk/gtkdata.hxx.)
    
    Change-Id: I5d60b4d9fd5b9e6e2fbecdf08d2b763cc15c4311
    Reviewed-on: https://gerrit.libreoffice.org/79574
    Tested-by: Jenkins
    Reviewed-by: Stephan Bergmann <sbergman at redhat.com>

diff --git a/vcl/unx/gtk/a11y/atkaction.cxx b/vcl/unx/gtk/a11y/atkaction.cxx
index 81e743238d84..14a172fe6ae3 100644
--- a/vcl/unx/gtk/a11y/atkaction.cxx
+++ b/vcl/unx/gtk/a11y/atkaction.cxx
@@ -32,7 +32,7 @@
 using namespace ::com::sun::star;
 
 // FIXME
-static G_CONST_RETURN gchar *
+static const gchar *
 getAsConst( const OString& rString )
 {
     static const int nMax = 10;
@@ -97,7 +97,7 @@ action_wrapper_get_n_actions (AtkAction *action)
     return 0;
 }
 
-static G_CONST_RETURN gchar *
+static const gchar *
 action_wrapper_get_description (AtkAction *, gint)
 {
     // GAIL implement this only for cells
@@ -105,7 +105,7 @@ action_wrapper_get_description (AtkAction *, gint)
     return "";
 }
 
-static G_CONST_RETURN gchar *
+static const gchar *
 action_wrapper_get_localized_name (AtkAction *, gint)
 {
     // GAIL doesn't implement this as well
@@ -116,7 +116,7 @@ action_wrapper_get_localized_name (AtkAction *, gint)
 #define ACTION_NAME_PAIR( OOoName, AtkName ) \
     std::pair< const OUString, const gchar * > ( OUString( OOoName ), AtkName )
 
-static G_CONST_RETURN gchar *
+static const gchar *
 action_wrapper_get_name (AtkAction *action,
                          gint       i)
 {
@@ -214,7 +214,7 @@ appendKeyStrokes(OStringBuffer& rBuffer, const uno::Sequence< awt::KeyStroke >&
     }
 }
 
-static G_CONST_RETURN gchar *
+static const gchar *
 action_wrapper_get_keybinding (AtkAction *action,
                                gint       i)
 {
diff --git a/vcl/unx/gtk/a11y/atkimage.cxx b/vcl/unx/gtk/a11y/atkimage.cxx
index baf45d45babe..acd43f467690 100644
--- a/vcl/unx/gtk/a11y/atkimage.cxx
+++ b/vcl/unx/gtk/a11y/atkimage.cxx
@@ -24,7 +24,7 @@
 using namespace ::com::sun::star;
 
 // FIXME
-static G_CONST_RETURN gchar *
+static const gchar *
 getAsConst( const OUString& rString )
 {
     static const int nMax = 10;
@@ -55,7 +55,7 @@ static css::uno::Reference<css::accessibility::XAccessibleImage>
 
 extern "C" {
 
-static G_CONST_RETURN gchar *
+static const gchar *
 image_get_image_description( AtkImage *image )
 {
     try {
diff --git a/vcl/unx/gtk/a11y/atktable.cxx b/vcl/unx/gtk/a11y/atktable.cxx
index 29ffa48d5b9d..221e55d2b287 100644
--- a/vcl/unx/gtk/a11y/atktable.cxx
+++ b/vcl/unx/gtk/a11y/atktable.cxx
@@ -36,7 +36,7 @@ atk_object_wrapper_conditional_ref( const uno::Reference< accessibility::XAccess
 /*****************************************************************************/
 
 // FIXME
-static G_CONST_RETURN gchar *
+static const gchar *
 getAsConst( const OUString& rString )
 {
     static const int nMax = 10;
@@ -244,7 +244,7 @@ table_wrapper_get_caption( AtkTable *table )
 
 /*****************************************************************************/
 
-static G_CONST_RETURN gchar *
+static const gchar *
 table_wrapper_get_row_description( AtkTable *table,
                                    gint      row )
 {
@@ -263,7 +263,7 @@ table_wrapper_get_row_description( AtkTable *table,
 
 /*****************************************************************************/
 
-static G_CONST_RETURN gchar *
+static const gchar *
 table_wrapper_get_column_description( AtkTable *table,
                                       gint      column )
 {
diff --git a/vcl/unx/gtk/a11y/atkutil.cxx b/vcl/unx/gtk/a11y/atkutil.cxx
index cac3ac6e4805..50ed2793bbf0 100644
--- a/vcl/unx/gtk/a11y/atkutil.cxx
+++ b/vcl/unx/gtk/a11y/atkutil.cxx
@@ -701,7 +701,7 @@ static Link<VclSimpleEvent&,void> g_aEventListenerLink( nullptr, WindowEventHand
 
 extern "C" {
 
-static G_CONST_RETURN gchar *
+static const gchar *
 ooo_atk_util_get_toolkit_name()
 {
     return "VCL";
@@ -709,7 +709,7 @@ ooo_atk_util_get_toolkit_name()
 
 /*****************************************************************************/
 
-static G_CONST_RETURN gchar *
+static const gchar *
 ooo_atk_util_get_toolkit_version()
 {
     return LIBO_VERSION_DOTTED;
diff --git a/vcl/unx/gtk/a11y/atkwrapper.cxx b/vcl/unx/gtk/a11y/atkwrapper.cxx
index 0998553bd927..cd439022cf2a 100644
--- a/vcl/unx/gtk/a11y/atkwrapper.cxx
+++ b/vcl/unx/gtk/a11y/atkwrapper.cxx
@@ -338,7 +338,7 @@ extern "C" {
 
 /*****************************************************************************/
 
-static G_CONST_RETURN gchar*
+static const gchar*
 wrapper_get_name( AtkObject *atk_obj )
 {
     AtkObjectWrapper *obj = ATK_OBJECT_WRAPPER (atk_obj);
@@ -369,7 +369,7 @@ wrapper_get_name( AtkObject *atk_obj )
 
 /*****************************************************************************/
 
-static G_CONST_RETURN gchar*
+static const gchar*
 wrapper_get_description( AtkObject *atk_obj )
 {
     AtkObjectWrapper *obj = ATK_OBJECT_WRAPPER (atk_obj);
diff --git a/vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx b/vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx
index e9b16217882b..c106aa0ce4c4 100644
--- a/vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx
+++ b/vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx
@@ -1789,7 +1789,7 @@ void SalGtkFilePicker::SetCurFilter( const OUString& rFilter )
     for( GSList *iter = filters; !bFound && iter; iter = iter->next )
     {
         GtkFileFilter* pFilter = static_cast<GtkFileFilter *>( iter->data );
-        G_CONST_RETURN gchar * filtername = gtk_file_filter_get_name( pFilter );
+        const gchar * filtername = gtk_file_filter_get_name( pFilter );
         OUString sFilterName( filtername, strlen( filtername ), RTL_TEXTENCODING_UTF8 );
 
         OUString aShrunkName = shrinkFilterName( rFilter );


More information about the Libreoffice-commits mailing list