]> sigrok.org Git - pulseview.git/commitdiff
More clazy fixes
authorSoeren Apel <redacted>
Sun, 21 Oct 2018 21:10:43 +0000 (23:10 +0200)
committerSoeren Apel <redacted>
Sun, 21 Oct 2018 21:10:43 +0000 (23:10 +0200)
pv/mainwindow.cpp
pv/views/trace/decodetrace.cpp
pv/views/trace/logicsignal.cpp
pv/views/trace/trace.cpp

index dfabc9a06797f0a080ae16069b16de70f0929280..c79364ebe738c8aca735f7cdae2a7f9c0ce1ce51 100644 (file)
@@ -172,8 +172,8 @@ shared_ptr<views::ViewBase> MainWindow::add_view(const QString &title,
                QDockWidget::DockWidgetFloatable | QDockWidget::DockWidgetClosable);
 
        QAbstractButton *close_btn =
-               dock->findChildren<QAbstractButton*>("qt_dockwidget_closebutton")
-                       .front();  // clazy:exclude=detaching-temporary
+               dock->findChildren<QAbstractButton*>("qt_dockwidget_closebutton")  // clazy:exclude=detaching-temporary
+                       .front();
 
        connect(close_btn, SIGNAL(clicked(bool)),
                this, SLOT(on_view_close_clicked()));
@@ -313,8 +313,8 @@ void MainWindow::remove_session(shared_ptr<Session> session)
                // When there are no more tabs, the height of the QTabWidget
                // drops to zero. We must prevent this to keep the static
                // widgets visible
-               for (QWidget *w : static_tab_widget_->findChildren<QWidget*>())
-                       w->setMinimumHeight(h);  // clazy:exclude=range-loop
+               for (QWidget *w : static_tab_widget_->findChildren<QWidget*>())  // clazy:exclude=range-loop
+                       w->setMinimumHeight(h);
 
                int margin = static_tab_widget_->layout()->contentsMargins().bottom();
                static_tab_widget_->setMinimumHeight(h + 2 * margin);
index 1f9e4c4e1b9bd7e0e2af3dad77817b33fec7f1bc..9c7196bfb04f24e1c3322172ce023d12f12f4b36 100644 (file)
@@ -333,7 +333,7 @@ QMenu* DecodeTrace::create_view_context_menu(QWidget *parent, QPoint &click_pos)
 
        QMenu* default_menu = Trace::create_view_context_menu(parent, click_pos);
        if (default_menu) {
-               for (QAction *action : default_menu->actions()) {
+               for (QAction *action : default_menu->actions()) {  // clazy:exclude=range-loop
                        menu->addAction(action);
                        if (action->parent() == default_menu)
                                action->setParent(menu);
@@ -899,7 +899,7 @@ void DecodeTrace::create_decoder_form(int index,
        const vector<DecodeChannel> channels = decode_signal_->get_channels();
 
        // Add the channels
-       for (DecodeChannel ch : channels) {
+       for (const DecodeChannel& ch : channels) {
                // Ignore channels not part of the decoder we create the form for
                if (ch.decoder_ != dec)
                        continue;
index 5c6aa54b2779375b5868b4be3d7dde9bff5250f5..8c4c982cd3507165b256d6a7a4cadd331c4155de 100644 (file)
@@ -583,8 +583,8 @@ void LogicSignal::populate_popup_form(QWidget *parent, QFormLayout *form)
 
                // Only allow triggers to be changed when we're stopped
                if (session_.get_capture_state() != Session::Stopped)
-                       for (QAction* action : trigger_bar_->findChildren<QAction*>())
-                               action->setEnabled(false);  // clazy:exclude=range-loop
+                       for (QAction* action : trigger_bar_->findChildren<QAction*>())  // clazy:exclude=range-loop
+                               action->setEnabled(false);
 
                form->addRow(tr("Trigger"), trigger_bar_);
        }
index 0a1fdf30684fc7bd800fc061f5fc7425a385c401..5c854aed17e2aa3db35f4b668ec6d5ad4b09662d 100644 (file)
@@ -191,7 +191,7 @@ QMenu* Trace::create_view_context_menu(QWidget *parent, QPoint &click_pos)
 
        QMenu* default_menu = TraceTreeItem::create_view_context_menu(parent, click_pos);
        if (default_menu) {
-               for (QAction *action : default_menu->actions()) {
+               for (QAction *action : default_menu->actions()) {  // clazy:exclude=range-loop
                        menu->addAction(action);
                        if (action->parent() == default_menu)
                                action->setParent(menu);