X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=pv%2Fmainwindow.cpp;h=b2a130a737a048f7b259b61e8fa72a2fa79fb9b8;hb=1ed73ebd60336c7b12ee1807644dca719cb9835b;hp=34938e7364cb5d827670558d903be0f6426fe0c0;hpb=fa8d0fcb4cff4f19943fe3ff152dc1428b400b01;p=pulseview.git diff --git a/pv/mainwindow.cpp b/pv/mainwindow.cpp index 34938e73..b2a130a7 100644 --- a/pv/mainwindow.cpp +++ b/pv/mainwindow.cpp @@ -95,7 +95,7 @@ MainWindow::~MainWindow() void MainWindow::show_session_error(const QString text, const QString info_text) { // TODO Emulate noquote() - qDebug() << "Notifying user of session error:" << info_text; + qDebug() << "Notifying user of session error: " << text << "; " << info_text; QMessageBox msg; msg.setText(text + "\n\n" + info_text); @@ -547,10 +547,14 @@ void MainWindow::setup_ui() session_selector_.setCornerWidget(static_tab_widget_, Qt::TopLeftCorner); session_selector_.setTabsClosable(true); +#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) + close_application_shortcut_ = new QShortcut(QKeySequence(Qt::CTRL | Qt::Key_Q), this, SLOT(close())); + close_current_tab_shortcut_ = new QShortcut(QKeySequence(Qt::CTRL | Qt::Key_W), this, SLOT(on_close_current_tab())); +#else close_application_shortcut_ = new QShortcut(QKeySequence(Qt::CTRL + Qt::Key_Q), this, SLOT(close())); - close_application_shortcut_->setAutoRepeat(false); - close_current_tab_shortcut_ = new QShortcut(QKeySequence(Qt::CTRL + Qt::Key_W), this, SLOT(on_close_current_tab())); +#endif + close_application_shortcut_->setAutoRepeat(false); connect(new_session_button_, SIGNAL(clicked(bool)), this, SLOT(on_new_session_clicked()));