replace deprecated g_type_class_add_private

This commit is contained in:
Christoph Holtermann 2018-12-04 19:57:11 +01:00 committed by c-holtermann
parent 84d1c3645d
commit 658da08008
2 changed files with 2 additions and 6 deletions

View File

@ -252,7 +252,7 @@ mark_account (Account *acc)
\********************************************************************/
/* GObject Initialization */
G_DEFINE_TYPE(Account, gnc_account, QOF_TYPE_INSTANCE)
G_DEFINE_TYPE_WITH_PRIVATE(Account, gnc_account, QOF_TYPE_INSTANCE)
static void
gnc_account_init(Account* acc)
@ -577,8 +577,6 @@ gnc_account_class_init (AccountClass *klass)
gobject_class->set_property = gnc_account_set_property;
gobject_class->get_property = gnc_account_get_property;
g_type_class_add_private(klass, sizeof(AccountPrivate));
g_object_class_install_property
(gobject_class,
PROP_NAME,

View File

@ -114,7 +114,7 @@ typedef struct QofInstancePrivate
#define GET_PRIVATE(o) \
(G_TYPE_INSTANCE_GET_PRIVATE ((o), QOF_TYPE_INSTANCE, QofInstancePrivate))
QOF_GOBJECT_GET_TYPE(QofInstance, qof_instance, G_TYPE_OBJECT, {});
QOF_GOBJECT_GET_TYPE(QofInstance, qof_instance, G_TYPE_OBJECT, G_ADD_PRIVATE(QofInstance));
QOF_GOBJECT_FINALIZE(qof_instance);
#undef G_PARAM_READWRITE
#define G_PARAM_READWRITE static_cast<GParamFlags>(G_PARAM_READABLE | G_PARAM_WRITABLE)
@ -136,8 +136,6 @@ static void qof_instance_class_init(QofInstanceClass *klass)
object_class->set_property = qof_instance_set_property;
object_class->get_property = qof_instance_get_property;
g_type_class_add_private(klass, sizeof(QofInstancePrivate));
klass->get_display_name = NULL;
klass->refers_to_object = NULL;
klass->get_typed_referring_object_list = NULL;