X-Git-Url: http://sigrok.org/gitweb/?a=blobdiff_plain;f=pv%2Fmainwindow.cpp;h=6749b5f0343517a6c0afb467f8907f7878dcd38f;hb=ab10caf9278808284c922f8df58a1cc9165d6501;hp=6758d77df88a1854141964ab54e1b80a9be1ad4a;hpb=24d69d27584c7adec70bc0d6db764a3db04fce3c;p=pulseview.git diff --git a/pv/mainwindow.cpp b/pv/mainwindow.cpp index 6758d77d..6749b5f0 100644 --- a/pv/mainwindow.cpp +++ b/pv/mainwindow.cpp @@ -333,8 +333,8 @@ shared_ptr MainWindow::add_session() shared_ptr session = make_shared(device_manager_, name); - connect(session.get(), SIGNAL(add_view(views::ViewType, Session*)), - this, SLOT(on_add_view(views::ViewType, Session*))); + connect(session.get(), SIGNAL(add_view(ViewType, Session*)), + this, SLOT(on_add_view(ViewType, Session*))); connect(session.get(), SIGNAL(name_changed()), this, SLOT(on_session_name_changed())); connect(session.get(), SIGNAL(device_changed()), @@ -659,6 +659,25 @@ bool MainWindow::restoreState(const QByteArray &state, int version) return false; } +void MainWindow::on_run_stop_clicked() +{ + shared_ptr session = last_focused_session_; + + if (!session) + return; + + switch (session->get_capture_state()) { + case Session::Stopped: + session->start_capture([&](QString message) { + show_session_error("Capture failed", message); }); + break; + case Session::AwaitingTrigger: + case Session::Running: + session->stop_capture(); + break; + } +} + void MainWindow::on_add_view(views::ViewType type, Session *session) { // We get a pointer and need a reference @@ -709,25 +728,6 @@ void MainWindow::on_new_session_clicked() add_session(); } -void MainWindow::on_run_stop_clicked() -{ - shared_ptr session = last_focused_session_; - - if (!session) - return; - - switch (session->get_capture_state()) { - case Session::Stopped: - session->start_capture([&](QString message) { - show_session_error("Capture failed", message); }); - break; - case Session::AwaitingTrigger: - case Session::Running: - session->stop_capture(); - break; - } -} - void MainWindow::on_settings_clicked() { dialogs::Settings dlg(device_manager_); @@ -881,6 +881,8 @@ void MainWindow::on_show_decoder_selector(Session *session) for (shared_ptr& s : sessions_) if (s.get() == session) add_subwindow(subwindows::SubWindowTypeDecoderSelector, *s); +#else + (void)session; #endif }