+ unique_ptr<QProgressDialog> progress(new QProgressDialog("",
+ QObject::tr("Cancel"), 0, context->drivers().size()));
+ progress->setWindowModality(Qt::WindowModal);
+ progress->setMinimumDuration(1); // To show the dialog immediately
+
+ int entry_num = 1;
+
+ for (auto entry : context->drivers()) {
+ progress->setLabelText(QObject::tr("Scanning for %1...")
+ .arg(QString::fromStdString(entry.first)));
+