summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIgnacio Casal Quinteiro <icq@gnome.org>2014-12-23 12:10:29 +0100
committerIgnacio Casal Quinteiro <icq@gnome.org>2014-12-23 12:10:29 +0100
commit084f8f1f83f500002f854e34b33888223410e1a5 (patch)
treeee150babec19e39e90015e2b1e1a95a15d2ad4a8
parentb413f0cbf9199270f9820bd1ccfb58749855e44b (diff)
downloadgusb-084f8f1f83f500002f854e34b33888223410e1a5.tar.gz
device: use constructed instead of constructor
This is just clearer.
-rw-r--r--gusb/gusb-device.c22
1 files changed, 5 insertions, 17 deletions
diff --git a/gusb/gusb-device.c b/gusb/gusb-device.c
index d40a33f..f769897 100644
--- a/gusb/gusb-device.c
+++ b/gusb/gusb-device.c
@@ -118,25 +118,13 @@ g_usb_device_set_property (GObject *object,
}
}
-static GObject *
-g_usb_device_constructor (GType gtype,
- guint n_properties,
- GObjectConstructParam *properties)
+static void
+g_usb_device_constructed (GObject *object)
{
- GObject *obj;
- GUsbDevice *device;
+ GUsbDevice *device = G_USB_DEVICE (object);
GUsbDevicePrivate *priv;
gint rc;
- {
- /* Always chain up to the parent constructor */
- GObjectClass *parent_class;
- parent_class = G_OBJECT_CLASS (g_usb_device_parent_class);
- obj = parent_class->constructor (gtype, n_properties,
- properties);
- }
-
- device = G_USB_DEVICE (obj);
priv = device->priv;
if (!priv->device)
@@ -149,7 +137,7 @@ g_usb_device_constructor (GType gtype,
g_warning ("Failed to get USB descriptor for device: %s",
g_usb_strerror (rc));
- return obj;
+ G_OBJECT_CLASS (g_usb_device_parent_class)->constructed (object);
}
static void
@@ -158,10 +146,10 @@ g_usb_device_class_init (GUsbDeviceClass *klass)
GParamSpec *pspec;
GObjectClass *object_class = G_OBJECT_CLASS (klass);
- object_class->constructor = g_usb_device_constructor;
object_class->finalize = g_usb_device_finalize;
object_class->get_property = g_usb_device_get_property;
object_class->set_property = g_usb_device_set_property;
+ object_class->constructed = g_usb_device_constructed;
/**
* GUsbDevice:libusb_device: