Fix random clazy warnings
[pulseview.git] / pv / mainwindow.cpp
index 6b3319b..dfabc9a 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();
+               dock->findChildren<QAbstractButton*>("qt_dockwidget_closebutton")
+                       .front();  // clazy:exclude=detaching-temporary
 
        connect(close_btn, SIGNAL(clicked(bool)),
                this, SLOT(on_view_close_clicked()));
@@ -314,7 +314,7 @@ void MainWindow::remove_session(shared_ptr<Session> session)
                // drops to zero. We must prevent this to keep the static
                // widgets visible
                for (QWidget *w : static_tab_widget_->findChildren<QWidget*>())
-                       w->setMinimumHeight(h);
+                       w->setMinimumHeight(h);  // clazy:exclude=range-loop
 
                int margin = static_tab_widget_->layout()->contentsMargins().bottom();
                static_tab_widget_->setMinimumHeight(h + 2 * margin);