X-Git-Url: http://git.code-monkey.de/?p=pulseview.git;a=blobdiff_plain;f=pv%2Fviews%2Ftrace%2Fheader.cpp;h=d7da7e03706bdab45389f127c8bc874871a3c74a;hp=c5510fcb40c44a8c6cf3ad4631736b51fac061ea;hb=f4ab4b5c657e5613caba82feaa81a8a400e4f331;hpb=9e773fecf2d4ab8f2fc6e1cc880b9102c22ec228 diff --git a/pv/views/trace/header.cpp b/pv/views/trace/header.cpp index c5510fc..d7da7e0 100644 --- a/pv/views/trace/header.cpp +++ b/pv/views/trace/header.cpp @@ -108,7 +108,7 @@ void Header::paintEvent(QPaintEvent*) QPainter painter(this); painter.setRenderHint(QPainter::Antialiasing); - for (const shared_ptr r : items) { + for (const shared_ptr& r : items) { assert(r); const bool highlight = !item_dragging_ && @@ -142,7 +142,7 @@ void Header::contextMenuEvent(QContextMenuEvent *event) menu->addAction(group); } - menu->exec(event->globalPos()); + menu->popup(event->globalPos()); } void Header::keyPressEvent(QKeyEvent *event) @@ -201,7 +201,7 @@ void Header::on_ungroup() restart = false; const vector< shared_ptr > groups( view_.list_by_type()); - for (const shared_ptr tg : groups) + for (const shared_ptr& tg : groups) if (tg->selected()) { tg->ungroup(); restart = true;