using std::unique_ptr;
using std::vector;
-using Glib::ustring;
-using Glib::Variant;
using Glib::VariantBase;
using sigrok::ConfigKey;
namespace pv {
-DeviceManager::DeviceManager(shared_ptr<Context> context, std::string driver) :
+DeviceManager::DeviceManager(shared_ptr<Context> context,
+ std::string driver, bool do_scan) :
context_(context)
{
unique_ptr<QProgressDialog> progress(new QProgressDialog("",
* 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)));
/**
* 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<const ConfigKey *, Glib::VariantBase>
DeviceManager::drive_scan_options(vector<string> user_spec,