X-Git-Url: https://sigrok.org/gitweb/?p=pulseview.git;a=blobdiff_plain;f=pv%2Fdevicemanager.cpp;h=5920486a9d6d8df54f7bb8dc8135bc38ff1620a8;hp=ccd3716a7509ff342827b9b8eaac30c4f3bcd403;hb=1d6e35dcef7686faec065cb775bd211fa47f2b73;hpb=b732b48fafdb5d237248a56764e184e10281a712 diff --git a/pv/devicemanager.cpp b/pv/devicemanager.cpp index ccd3716a..5920486a 100644 --- a/pv/devicemanager.cpp +++ b/pv/devicemanager.cpp @@ -56,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("", @@ -84,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)));