X-Git-Url: https://sigrok.org/gitweb/?p=pulseview.git;a=blobdiff_plain;f=pv%2Fdialogs%2Fconnect.cpp;h=52530beb5d391815233f8a11140bde1c2d5ad20b;hp=ea411f156cf33b52f4f86ed61db2ed017a7418f4;hb=819f4c25391a9c74d3d2f528d462142d5c4aad4d;hpb=dd63af740355865cc0659dfba74ecf4445414bc8 diff --git a/pv/dialogs/connect.cpp b/pv/dialogs/connect.cpp index ea411f15..52530beb 100644 --- a/pv/dialogs/connect.cpp +++ b/pv/dialogs/connect.cpp @@ -31,7 +31,8 @@ extern "C" { #include } -using namespace std; +using std::list; +using std::string; extern sr_context *sr_ctx; @@ -102,8 +103,8 @@ void Connect::populate_drivers() * 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++) @@ -163,7 +164,7 @@ void Connect::scan_pressed() BOOST_FOREACH(sr_dev_inst *const sdi, devices) { const string title = DeviceManager::format_device_title(sdi); - QString text(title.c_str()); + QString text = QString::fromUtf8(title.c_str()); if (sdi->probes) { text += QString(" with %1 probes").arg( g_slist_length(sdi->probes)); @@ -189,8 +190,8 @@ void Connect::device_selected(int index) 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));