X-Git-Url: https://sigrok.org/gitweb/?p=pulseview.git;a=blobdiff_plain;f=pv%2Fdevicemanager.cpp;h=5920486a9d6d8df54f7bb8dc8135bc38ff1620a8;hp=35efa12786bb524003bbdbe0ff4eecf54d59927e;hb=4a07615736968fc8d635c8d187b8a5d6b8a0e2eb;hpb=3083cda853bd12d73b741c3bc97b70f5d395a15a diff --git a/pv/devicemanager.cpp b/pv/devicemanager.cpp index 35efa127..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)));