* and sensors.
*/
bool supported_device = false;
- if ((sr_config_list(drivers[i], SR_CONF_DEVICE_OPTIONS,
- &gvar_opts, NULL) == SR_OK)) {
+ if ((sr_config_list(drivers[i], NULL, NULL,
+ SR_CONF_DEVICE_OPTIONS, &gvar_opts) == SR_OK)) {
hwopts = (const int32_t *)g_variant_get_fixed_array(gvar_opts,
&num_opts, sizeof(int32_t));
for (unsigned int j = 0; j < num_opts; j++)
g_slist_free_full(drvopts, (GDestroyNotify)free_drvopts);
- BOOST_FOREACH(sr_dev_inst *const sdi, devices) {
-
- QString text;
- if (sdi->vendor && sdi->vendor[0])
- text += QString("%1 ").arg(sdi->vendor);
- if (sdi->model && sdi->model[0])
- text += QString("%1 ").arg(sdi->model);
- if (sdi->version && sdi->version[0])
- text += QString("%1 ").arg(sdi->version);
+ BOOST_FOREACH(sr_dev_inst *const sdi, devices)
+ {
+ const string title = DeviceManager::format_device_title(sdi);
+ QString text(title.c_str());
if (sdi->probes) {
- text += QString("with %1 probes").arg(
+ text += QString(" with %1 probes").arg(
g_slist_length(sdi->probes));
}
unset_connection();
- if ((sr_config_list(driver, SR_CONF_SCAN_OPTIONS,
- &gvar_list, NULL) == SR_OK)) {
+ if ((sr_config_list(driver, NULL, NULL,
+ SR_CONF_SCAN_OPTIONS, &gvar_list) == SR_OK)) {
hwopts = (const int32_t *)g_variant_get_fixed_array(gvar_list,
&num_opts, sizeof(int32_t));