From: Bartosz Golaszewski Date: Wed, 18 Feb 2015 16:19:08 +0000 (+0100) Subject: mainwindow: add missing checks against ENABLE_DECODE X-Git-Tag: pulseview-0.3.0~236 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=e79171dc88959745ce0bf483dc25e86b28f253ed;p=pulseview.git mainwindow: add missing checks against ENABLE_DECODE Pulseview doesn't compile with -DENABLE_DECODE=FALSE. Add missing checks against ENABLE_DECODE in mainwindow.cpp/.hpp. Signed-off-by: Bartosz Golaszewski --- diff --git a/pv/mainwindow.cpp b/pv/mainwindow.cpp index 7dcf8958..49152a26 100644 --- a/pv/mainwindow.cpp +++ b/pv/mainwindow.cpp @@ -101,8 +101,10 @@ MainWindow::MainWindow(DeviceManager &device_manager, action_view_zoom_fit_(new QAction(this)), action_view_zoom_one_to_one_(new QAction(this)), action_view_show_cursors_(new QAction(this)), - action_about_(new QAction(this)), - menu_decoders_add_(new pv::widgets::DecoderMenu(this, true)) + action_about_(new QAction(this)) +#ifdef ENABLE_DECODE + , menu_decoders_add_(new pv::widgets::DecoderMenu(this, true)) +#endif /* ENABLE_DECODE */ { setup_ui(); restore_ui_settings(); @@ -164,10 +166,12 @@ QAction* MainWindow::action_about() const return action_about_; } +#ifdef ENABLE_DECODE QMenu* MainWindow::menu_decoder_add() const { return menu_decoders_add_; } +#endif /* ENABLE_DECODE */ void MainWindow::run_stop() { diff --git a/pv/mainwindow.hpp b/pv/mainwindow.hpp index f975ca51..d2bcd918 100644 --- a/pv/mainwindow.hpp +++ b/pv/mainwindow.hpp @@ -51,7 +51,9 @@ class View; } namespace widgets { +#ifdef ENABLE_DECODE class DecoderMenu; +#endif /* ENABLE_DECODE */ } class MainWindow : public QMainWindow @@ -87,7 +89,9 @@ public: QAction* action_view_show_cursors() const; QAction* action_about() const; +#ifdef ENABLE_DECODE QMenu* menu_decoder_add() const; +#endif /* ENABLE_DECODE */ void run_stop(); @@ -167,7 +171,9 @@ private: QAction *const action_view_show_cursors_; QAction *const action_about_; +#ifdef ENABLE_DECODE QMenu *const menu_decoders_add_; +#endif /* ENABLE_DECODE */ }; } // namespace pv