[Libreoffice-commits] .: sd/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Tue Sep 18 13:01:32 PDT 2012


 sd/source/ui/remotecontrol/BluetoothServer.cxx |   15 +++++++--------
 1 file changed, 7 insertions(+), 8 deletions(-)

New commits:
commit 0a84d2f3bf5b13cabc266df411ee1bffcf5f9adf
Author: Andrzej J.R. Hunt <andrzej at ahunt.org>
Date:   Tue Sep 18 22:00:36 2012 +0200

    Remove unnecessary use of GVariant to allow building on older GLib.
    
    Change-Id: Ie66a8b82193fce4060ca4949ace574398f95515e

diff --git a/sd/source/ui/remotecontrol/BluetoothServer.cxx b/sd/source/ui/remotecontrol/BluetoothServer.cxx
index 1521b1e..c859f95 100644
--- a/sd/source/ui/remotecontrol/BluetoothServer.cxx
+++ b/sd/source/ui/remotecontrol/BluetoothServer.cxx
@@ -123,10 +123,9 @@ bool BluetoothServer::isDiscoverable()
             g_error_free( aError );
         return false;
     }
-    GVariant* aVariant = dbus_g_value_build_g_variant ( (GValue*)
-            g_hash_table_lookup( aProperties, "Discoverable" ) );
-    gboolean aIsDiscoverable = g_variant_get_boolean( aVariant );
-    g_free( aVariant );
+
+    gboolean aIsDiscoverable = g_value_get_boolean( (GValue*) g_hash_table_lookup(
+                aProperties, "Discoverable" ) );
 
     g_free( aProperties );
     return aIsDiscoverable;
@@ -171,10 +170,10 @@ void BluetoothServer::setDiscoverable( bool aDiscoverable )
             g_error_free( aError );
         return;
     }
-    GVariant* aVariant = dbus_g_value_build_g_variant( (GValue*)
-            g_hash_table_lookup( aProperties, "Powered" ) );
-    gboolean aPowered = g_variant_get_boolean( aVariant );
-    g_free( aVariant );
+
+    gboolean aPowered = g_value_get_boolean( (GValue*) g_hash_table_lookup(
+                aProperties, "Powered" ) );
+
     g_free( aProperties );
     if ( !aPowered )
     {


More information about the Libreoffice-commits mailing list