X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=pv%2Fdialogs%2Fconnect.cpp;h=4fcbf694279edd0a4a2527d4869e6e45aa93ed01;hb=3d87310109576c77819c4c592d41bc1d9731978b;hp=e5cc3dd70c088c9ad698229aaac3d3da26e8d9a1;hpb=fe3a1c218407f6b8a0d7ac7c454593809212ea9e;p=pulseview.git diff --git a/pv/dialogs/connect.cpp b/pv/dialogs/connect.cpp index e5cc3dd7..4fcbf694 100644 --- a/pv/dialogs/connect.cpp +++ b/pv/dialogs/connect.cpp @@ -24,7 +24,8 @@ #include "connect.hpp" -#include "pv/devicemanager.hpp" +#include +#include using std::list; using std::map; @@ -38,7 +39,8 @@ using Glib::VariantBase; using sigrok::ConfigKey; using sigrok::Driver; using sigrok::Error; -using sigrok::HardwareDevice; + +using pv::devices::HardwareDevice; namespace pv { namespace dialogs { @@ -167,7 +169,7 @@ void Connect::scan_pressed() serial.toUtf8().constData()); } - list< shared_ptr > devices = + const list< shared_ptr > devices = device_manager_.driver_scan(driver, drvopts); for (shared_ptr device : devices) @@ -175,8 +177,9 @@ void Connect::scan_pressed() assert(device); QString text = QString::fromStdString( - device_manager_.get_display_name(device)); - text += QString(" with %1 channels").arg(device->channels().size()); + device->display_name(device_manager_)); + text += QString(" with %1 channels").arg( + device->device()->channels().size()); QListWidgetItem *const item = new QListWidgetItem(text, &device_list_);