[glibmm] Variant: Use variant_type() functions in implementation where possible.
- From: José Alburquerque <jaalburqu src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glibmm] Variant: Use variant_type() functions in implementation where possible.
- Date: Thu, 13 Jan 2011 23:06:40 +0000 (UTC)
commit c2bcea251a982ea7aed556b510e8c0566cf68b63
Author: José Alburquerque <jaalburqu svn gnome org>
Date: Thu Jan 13 18:04:30 2011 -0500
Variant: Use variant_type() functions in implementation where possible.
* glib/src/variant.ccg: Use the existing variant_type() functions
where possible.
* gio/src/dbusserver.ccg: File bug #639478 about GDBusServer's new
function doing more than using g_initable_new().
ChangeLog | 9 +++++++++
gio/src/dbusserver.ccg | 4 ++++
glib/src/variant.ccg | 12 ++++--------
3 files changed, 17 insertions(+), 8 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 6317196..a40b655 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,14 @@
2011-01-13 José Alburquerque <jaalburqu svn gnome org>
+ Variant: Use variant_type() functions in implementation where possible.
+
+ * glib/src/variant.ccg: Use the existing variant_type() functions
+ where possible.
+ * gio/src/dbusserver.ccg: File bug #639478 about GDBusServer's new
+ function doing more than using g_initable_new().
+
+2011-01-13 José Alburquerque <jaalburqu svn gnome org>
+
Variant: Have the variant_type() functions return actual types.
* glib/src/variant.hg: Correct the variant_type() functions of the
diff --git a/gio/src/dbusserver.ccg b/gio/src/dbusserver.ccg
index 60c39ae..e5cdb86 100644
--- a/gio/src/dbusserver.ccg
+++ b/gio/src/dbusserver.ccg
@@ -84,6 +84,7 @@ Glib::RefPtr<DBusServer> DBusServer::create_sync(const std::string& address,
{
//TODO: Use the constructor instead of the code underneath when
//g_dbus_server_new_sync() does not do more than call g_initable_new().
+ //https://bugzilla.gnome.org/show_bug.cgi?id=639478
//return Glib::RefPtr<DBusServer>(new DBusServer(address, guid, observer,
//cancellable, flags));
@@ -110,6 +111,7 @@ Glib::RefPtr<DBusServer> DBusServer::create_sync(const std::string& address,
{
//TODO: Use the constructor instead of the code underneath when
//g_dbus_server_new_sync() does not do more than call g_initable_new().
+ //https://bugzilla.gnome.org/show_bug.cgi?id=639478
//return Glib::RefPtr<DBusServer>(new DBusServer(address, guid,
//cancellable, flags));
@@ -135,6 +137,7 @@ Glib::RefPtr<DBusServer> DBusServer::create_sync(const std::string& address,
{
//TODO: Use the constructor instead of the code underneath when
//g_dbus_server_new_sync() does not do more than call g_initable_new().
+ //https://bugzilla.gnome.org/show_bug.cgi?id=639478
//return Glib::RefPtr<DBusServer>(new DBusServer(address, guid, observer,
//flags));
@@ -160,6 +163,7 @@ Glib::RefPtr<DBusServer> DBusServer::create_sync(const std::string& address,
{
//TODO: Use the constructor instead of the code underneath when
//g_dbus_server_new_sync() does not do more than call g_initable_new().
+ //https://bugzilla.gnome.org/show_bug.cgi?id=639478
//return Glib::RefPtr<DBusServer>(new DBusServer(address, guid, flags));
GError* gerror = 0;
diff --git a/glib/src/variant.ccg b/glib/src/variant.ccg
index bcd4315..6246304 100644
--- a/glib/src/variant.ccg
+++ b/glib/src/variant.ccg
@@ -197,8 +197,7 @@ Variant<type_vec_ustring>::create(const type_vec_ustring& data)
VariantType element_variant_type = Variant<Glib::ustring>::variant_type();
// Get the variant type of the array.
- VariantType array_variant_type =
- VariantType::create_array(element_variant_type);
+ VariantType array_variant_type = Variant<type_vec_ustring>::variant_type();
// Create a GVariantBuilder to build the array.
GVariantBuilder* builder = g_variant_builder_new(array_variant_type.gobj());
@@ -256,8 +255,7 @@ VariantIter Variant<type_vec_ustring>::get_iter() const
VariantType element_variant_type = Variant<Glib::ustring>::variant_type();
// Get the variant type of the array.
- VariantType array_variant_type =
- VariantType::create_array(element_variant_type);
+ VariantType array_variant_type = Variant<type_vec_ustring>::variant_type();
// Get the GVariantIter.
GVariantIter* g_iter = 0;
@@ -283,8 +281,7 @@ Variant<type_vec_string>::create(const type_vec_string& data)
VariantType element_variant_type = Variant<std::string>::variant_type();
// Get the variant type of the array.
- VariantType array_variant_type =
- VariantType::create_array(element_variant_type);
+ VariantType array_variant_type = Variant<type_vec_string>::variant_type();
// Create a GVariantBuilder to build the array.
GVariantBuilder* builder = g_variant_builder_new(array_variant_type.gobj());
@@ -342,8 +339,7 @@ VariantIter Variant<type_vec_string>::get_iter() const
VariantType element_variant_type = Variant<std::string>::variant_type();
// Get the variant type of the array.
- VariantType array_variant_type =
- VariantType::create_array(element_variant_type);
+ VariantType array_variant_type = Variant<type_vec_string>::variant_type();
// Get the GVariantIter.
GVariantIter* g_iter = 0;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]