[glibmm] Gio::Application::custom_class_init(): Update a comment
- From: Kjell Ahlstedt <kjellahl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glibmm] Gio::Application::custom_class_init(): Update a comment
- Date: Wed, 27 Sep 2017 14:13:47 +0000 (UTC)
commit e1751f95986a216b0c4d202b897e9c6ea4fe2669
Author: Kjell Ahlstedt <kjellahlstedt gmail com>
Date: Wed Sep 27 16:11:07 2017 +0200
Gio::Application::custom_class_init(): Update a comment
The private custom_class_init() method is still needed, but the
reason is no longer that the deprecated g_type_init() must be called.
gio/src/application.ccg | 6 ++++--
gio/src/application.hg | 6 ++----
2 files changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/gio/src/application.ccg b/gio/src/application.ccg
index ca57852..d85ae8d 100644
--- a/gio/src/application.ccg
+++ b/gio/src/application.ccg
@@ -272,9 +272,11 @@ Application::custom_class_init()
Application::Application(const Glib::ustring& application_id, Flags flags)
: // Mark this class as non-derived to allow C++ vfuncs to be skipped.
+ // GApplication complains about "" but allows nullptr, so we avoid passing "".
Glib::ObjectBase(nullptr),
- Glib::Object(Glib::ConstructParams(custom_class_init(), "application_id",
- Glib::c_str_or_nullptr(application_id), "flags", ((GApplicationFlags)(flags)), nullptr))
+ Glib::Object(Glib::ConstructParams(custom_class_init(),
+ "application_id", Glib::c_str_or_nullptr(application_id),
+ "flags", static_cast<GApplicationFlags>(flags), nullptr))
{
}
diff --git a/gio/src/application.hg b/gio/src/application.hg
index 5f414a9..7767854 100644
--- a/gio/src/application.hg
+++ b/gio/src/application.hg
@@ -421,10 +421,8 @@ protected:
_WRAP_VFUNC(void dbus_unregister(const Glib::RefPtr<DBus::Connection>& connection, const Glib::ustring&
object_path), "dbus_unregister")
private:
- /** This is just a way to call Glib::init() (which calls g_type_init()) before
- * calling application_class_.init(), so that
- * g_application_get_type() will always succeed.
- * See https://bugzilla.gnome.org/show_bug.cgi?id=639925
+ /** This is just a way to call Glib::init() before calling a Glib::Object ctor,
+ * so that glibmm's GQuarks are created before they are used.
*/
const Glib::Class& custom_class_init();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]