diff options
author | Murray Cumming <murrayc@murrayc.com> | 2011-03-29 11:15:30 +0200 |
---|---|---|
committer | Murray Cumming <murrayc@murrayc.com> | 2011-03-29 11:16:40 +0200 |
commit | 85252750b27d79458f6b91763c34c1829eac491b (patch) | |
tree | b614b0755a9be7d5d373c71eb5c3d4c87417b70b /examples | |
parent | 00a2fa0f7f7fa2b998e8812e677a239f5d62ec49 (diff) | |
download | glibmm-85252750b27d79458f6b91763c34c1829eac491b.tar.gz |
Variant: Rename get(index) to get_child(index).
* glib/src/variant.[hg|ccg]: Rename all get() methods that return children
to get_child() to make the API clearer and to avoid ambiguity with get()
methods that return the underlying type instead.
* examples/dbus/peer.cc:
* examples/dbus/userbus.cc:
* tests/glibmm_variant/main.cc: Adapted.
https://bugzilla.gnome.org/show_bug.cgi?id=644207#c7
(Yannick Guesnet)
Diffstat (limited to 'examples')
-rw-r--r-- | examples/dbus/peer.cc | 4 | ||||
-rw-r--r-- | examples/dbus/userbus.cc | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/examples/dbus/peer.cc b/examples/dbus/peer.cc index c35bab8e..99cdb66b 100644 --- a/examples/dbus/peer.cc +++ b/examples/dbus/peer.cc @@ -120,7 +120,7 @@ static void on_method_call(const Glib::RefPtr<Gio::DBus::Connection>&, // Get (expected) single string in tupple. Glib::Variant<Glib::ustring> param; - parameters.get(param); + parameters.get_child(param); Glib::ustring response = "You said: '" + param.get() + "'."; @@ -266,7 +266,7 @@ void run_as_client(Glib::ustring address) "HelloWorld", parameters); Glib::Variant<Glib::ustring> child; - result.get(child); + result.get_child(child); std::cout << "The server said: " << child.get() << "." << std::endl; diff --git a/examples/dbus/userbus.cc b/examples/dbus/userbus.cc index 845db3b8..89f942fa 100644 --- a/examples/dbus/userbus.cc +++ b/examples/dbus/userbus.cc @@ -53,7 +53,7 @@ void dbus_proxy_available(Glib::RefPtr<Gio::AsyncResult>& result) // Now extract the single item in the variant container which is the // array of strings (the names). Glib::Variant< std::vector<Glib::ustring> > names_variant; - result.get(names_variant); + result.get_child(names_variant); // Get the vector of strings. std::vector<Glib::ustring> names = names_variant.get(); |