]> sigrok.org Git - pulseview.git/commitdiff
mainwindow: add missing checks against ENABLE_DECODE
authorBartosz Golaszewski <redacted>
Wed, 18 Feb 2015 16:19:08 +0000 (17:19 +0100)
committerUwe Hermann <redacted>
Fri, 20 Feb 2015 10:17:04 +0000 (11:17 +0100)
Pulseview doesn't compile with -DENABLE_DECODE=FALSE. Add missing
checks against ENABLE_DECODE in mainwindow.cpp/.hpp.

Signed-off-by: Bartosz Golaszewski <redacted>
pv/mainwindow.cpp
pv/mainwindow.hpp

index 7dcf8958e4dd29fc3778f7b19e3c94d664993c0b..49152a26fe68088565a1ee0068ae235ff597ef8c 100644 (file)
@@ -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()
 {
index f975ca516b5dbc0c84dbccd1e2c967e256ac3467..d2bcd918361ce6fc4e053f3f7d6196d37412154f 100644 (file)
@@ -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