summaryrefslogtreecommitdiff
path: root/libnm-core/nm-setting-user.c
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2018-06-24 17:41:02 +0200
committerThomas Haller <thaller@redhat.com>2018-07-01 18:17:31 +0200
commitfa9fe466dbf74dd07acfd83ba440a0f48c41d401 (patch)
tree794de899b28bb44739fab592bdb5bc2e4f87cc04 /libnm-core/nm-setting-user.c
parentecd53944b37913ea6a4eebbd71bd3cbf77debc2f (diff)
downloadNetworkManager-fa9fe466dbf74dd07acfd83ba440a0f48c41d401.tar.gz
libnm: avoid constructor function for registering NMSetting types
constructor functions are ugly, because code is running before main() starts. Instead, as the registration code for NMSetting types is insid the GType constructor, we just need to ensure at the right place, that the GType was created. The right place here is _register_settings_ensure_inited(), because that is called before we need the registration information.
Diffstat (limited to 'libnm-core/nm-setting-user.c')
-rw-r--r--libnm-core/nm-setting-user.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/libnm-core/nm-setting-user.c b/libnm-core/nm-setting-user.c
index ccc030aacd..56dd71e93f 100644
--- a/libnm-core/nm-setting-user.c
+++ b/libnm-core/nm-setting-user.c
@@ -65,7 +65,6 @@ struct _NMSettingUserClass {
G_DEFINE_TYPE_WITH_CODE (NMSettingUser, nm_setting_user, NM_TYPE_SETTING,
_nm_register_setting (USER, NM_SETTING_PRIORITY_USER))
-NM_SETTING_REGISTER_TYPE (NM_TYPE_SETTING_USER)
#define NM_SETTING_USER_GET_PRIVATE(self) _NM_GET_PRIVATE(self, NMSettingUser, NM_IS_SETTING_USER)