mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
replace deprecated g_type_class_add_private
This commit is contained in:
parent
84d1c3645d
commit
658da08008
@ -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,
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user