]> sigrok.org Git - pulseview.git/blobdiff - pv/mainwindow.cpp
clang-tidy and clazy proposals
[pulseview.git] / pv / mainwindow.cpp
index 51ebda8369a05be3ec1d3555cb9e0e5f1bb24015..799f10d4b7c3bb7d3f8ccabd70e319df988ec990 100644 (file)
@@ -146,7 +146,7 @@ shared_ptr<views::ViewBase> MainWindow::add_view(views::ViewType type,
        // Only use the view type in the name if it's not the main view
        QString title;
        if (main_bar)
-               title = QString("%1 (%2)").arg(session.name()).arg(views::ViewTypeNames[type]);
+               title = QString("%1 (%2)").arg(session.name()views::ViewTypeNames[type]);
        else
                title = session.name();
 
@@ -306,6 +306,9 @@ shared_ptr<subwindows::SubWindowBase> MainWindow::add_subwindow(
                dock->findChildren<QAbstractButton*>  // clazy:exclude=detaching-temporary
                        ("qt_dockwidget_closebutton").front();
 
+       // Allow all subwindows to be closed via ESC.
+       close_btn->setShortcut(QKeySequence(Qt::Key_Escape));
+
        connect(close_btn, SIGNAL(clicked(bool)),
                this, SLOT(on_sub_window_close_clicked()));