using std::pair;
using std::string;
using std::shared_ptr;
+using std::vector;
using sigrok::Context;
using sigrok::OutputFormat;
namespace widgets {
ExportMenu::ExportMenu(QWidget *parent, shared_ptr<Context> context,
- std::vector<QAction *>open_actions) :
+ vector<QAction *>open_actions) :
QMenu(parent),
context_(context),
mapper_(this)
const map<string, shared_ptr<OutputFormat> > formats =
context->output_formats();
- for (const pair<string, shared_ptr<OutputFormat> > &f : formats) {
+ for (const pair<const string, shared_ptr<OutputFormat> > &f : formats) {
if (f.first == "srzip")
continue;
assert(f.second);
QAction *const action = addAction(tr("Export %1...")
.arg(QString::fromStdString(f.second->description())));
- action->setData(qVariantFromValue((void*)f.second.get()));
+ action->setData(QVariant::fromValue((void*)f.second.get()));
mapper_.setMapping(action, action);
connect(action, SIGNAL(triggered()), &mapper_, SLOT(map()));
}
format_selected((*iter).second);
}
-} // widgets
-} // pv
+} // namespace widgets
+} // namespace pv