X-Git-Url: https://sigrok.org/gitweb/?p=pulseview.git;a=blobdiff_plain;f=pv%2Fdevicemanager.cpp;h=5920486a9d6d8df54f7bb8dc8135bc38ff1620a8;hp=15e791e128eb8e542ec705459be51d4ec41dd5ba;hb=efadabab3de1a4c5b9cd09316de5d9ae66251519;hpb=58d8e4c6c50bb119d405d754a6fb122d932d6510 diff --git a/pv/devicemanager.cpp b/pv/devicemanager.cpp index 15e791e1..5920486a 100644 --- a/pv/devicemanager.cpp +++ b/pv/devicemanager.cpp @@ -48,8 +48,6 @@ using std::string; using std::unique_ptr; using std::vector; -using Glib::ustring; -using Glib::Variant; using Glib::VariantBase; using sigrok::ConfigKey; @@ -58,7 +56,8 @@ using sigrok::Driver; namespace pv { -DeviceManager::DeviceManager(shared_ptr context, std::string driver) : +DeviceManager::DeviceManager(shared_ptr context, + std::string driver, bool do_scan) : context_(context) { unique_ptr progress(new QProgressDialog("", @@ -86,6 +85,8 @@ DeviceManager::DeviceManager(shared_ptr context, std::string driver) : * best effort auto detection. */ for (auto entry : context->drivers()) { + if (!do_scan) + break; progress->setLabelText(QObject::tr("Scanning for %1...") .arg(QString::fromStdString(entry.first))); @@ -170,10 +171,10 @@ DeviceManager::user_spec_device() const /** * Convert generic options to data types that are specific to Driver::scan(). * - * @param[in] user_spec vector of tokenized words, string format - * @param[in] driver_opts driver's scan options, result of Driver::scan_options() + * @param[in] user_spec Vector of tokenized words, string format. + * @param[in] driver_opts Driver's scan options, result of Driver::scan_options(). * - * @return map of options suitable for Driver::scan() + * @return Map of options suitable for Driver::scan(). */ map DeviceManager::drive_scan_options(vector user_spec,