From: Martin Ling Date: Sat, 19 Jul 2014 18:15:55 +0000 (+0100) Subject: Don't use Qt-defined keywords, they can cause problems with other headers. X-Git-Url: http://git.code-monkey.de/?p=pulseview.git;a=commitdiff_plain;h=e9213170687cf4afd14e20acdc690ff9381d94ae Don't use Qt-defined keywords, they can cause problems with other headers. --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 069ccd8..a8cd6c7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -275,7 +275,7 @@ endif() #= Global Definitions #------------------------------------------------------------------------------- -add_definitions(${QT_DEFINITIONS}) +add_definitions(${QT_DEFINITIONS} -DQT_NO_KEYWORDS) add_definitions(-D__STDC_LIMIT_MACROS) add_definitions(-Wall -Wextra) add_definitions(-std=c++11) diff --git a/pv/data/decoderstack.h b/pv/data/decoderstack.h index 16a7c0c..35f7687 100644 --- a/pv/data/decoderstack.h +++ b/pv/data/decoderstack.h @@ -118,14 +118,14 @@ private: static void annotation_callback(srd_proto_data *pdata, void *decoder); -private slots: +private Q_SLOTS: void on_new_frame(); void on_data_received(); void on_frame_ended(); -signals: +Q_SIGNALS: void new_decode_data(); private: diff --git a/pv/device/devinst.h b/pv/device/devinst.h index 0443d3e..4f0b6de 100644 --- a/pv/device/devinst.h +++ b/pv/device/devinst.h @@ -81,7 +81,7 @@ public: virtual void run(); -signals: +Q_SIGNALS: void config_changed(); protected: diff --git a/pv/dialogs/connect.h b/pv/dialogs/connect.h index a3f05ee..e1a2c30 100644 --- a/pv/dialogs/connect.h +++ b/pv/dialogs/connect.h @@ -61,7 +61,7 @@ private: void set_serial_connection(); -private slots: +private Q_SLOTS: void device_selected(int index); void scan_pressed(); diff --git a/pv/dialogs/storeprogress.h b/pv/dialogs/storeprogress.h index 7d53832..eaf235f 100644 --- a/pv/dialogs/storeprogress.h +++ b/pv/dialogs/storeprogress.h @@ -51,7 +51,7 @@ private: void closeEvent(QCloseEvent*); -private slots: +private Q_SLOTS: void on_progress_updated(); private: diff --git a/pv/mainwindow.h b/pv/mainwindow.h index f026e8f..41c55ba 100644 --- a/pv/mainwindow.h +++ b/pv/mainwindow.h @@ -72,7 +72,7 @@ private: */ void update_device_list(); -private slots: +private Q_SLOTS: void load_file(QString file_name); diff --git a/pv/popups/probes.h b/pv/popups/probes.h index 4265c15..434d039 100644 --- a/pv/popups/probes.h +++ b/pv/popups/probes.h @@ -72,7 +72,7 @@ private: private: void showEvent(QShowEvent *e); -private slots: +private Q_SLOTS: void on_probe_checked(QWidget *widget); void enable_all_probes(); diff --git a/pv/prop/bool.h b/pv/prop/bool.h index 0d8e205..c96c87a 100644 --- a/pv/prop/bool.h +++ b/pv/prop/bool.h @@ -42,7 +42,7 @@ public: void commit(); -private slots: +private Q_SLOTS: void on_state_changed(int); private: diff --git a/pv/prop/double.h b/pv/prop/double.h index ba4c595..0dd0ba3 100644 --- a/pv/prop/double.h +++ b/pv/prop/double.h @@ -49,7 +49,7 @@ public: void commit(); -private slots: +private Q_SLOTS: void on_value_changed(double); private: diff --git a/pv/prop/enum.h b/pv/prop/enum.h index a7e6ed8..eff6647 100644 --- a/pv/prop/enum.h +++ b/pv/prop/enum.h @@ -45,7 +45,7 @@ public: void commit(); -private slots: +private Q_SLOTS: void on_current_item_changed(int); private: diff --git a/pv/prop/int.h b/pv/prop/int.h index 6d910cd..1a3180a 100644 --- a/pv/prop/int.h +++ b/pv/prop/int.h @@ -47,7 +47,7 @@ public: void commit(); -private slots: +private Q_SLOTS: void on_value_changed(int); private: diff --git a/pv/prop/string.h b/pv/prop/string.h index d54635f..01c7e78 100644 --- a/pv/prop/string.h +++ b/pv/prop/string.h @@ -39,7 +39,7 @@ public: void commit(); -private slots: +private Q_SLOTS: void on_text_edited(const QString&); private: diff --git a/pv/sigsession.h b/pv/sigsession.h index d1f11ea..a06de7e 100644 --- a/pv/sigsession.h +++ b/pv/sigsession.h @@ -180,7 +180,7 @@ private: std::thread _sampling_thread; -signals: +Q_SIGNALS: void capture_state_changed(int state); void signals_changed(); diff --git a/pv/storesession.h b/pv/storesession.h index ffe1fac..8366427 100644 --- a/pv/storesession.h +++ b/pv/storesession.h @@ -64,7 +64,7 @@ public: private: void store_proc(std::shared_ptr snapshot); -signals: +Q_SIGNALS: void progress_updated(); private: diff --git a/pv/toolbars/samplingbar.h b/pv/toolbars/samplingbar.h index 2c2431c..0f4c2ee 100644 --- a/pv/toolbars/samplingbar.h +++ b/pv/toolbars/samplingbar.h @@ -69,7 +69,7 @@ public: void set_capture_state(pv::SigSession::capture_state state); -signals: +Q_SIGNALS: void run_stop(); private: @@ -80,7 +80,7 @@ private: void commit_sample_rate(); void commit_sample_count(); -private slots: +private Q_SLOTS: void on_device_selected(); void on_sample_count_changed(); void on_sample_rate_changed(); diff --git a/pv/view/decodetrace.h b/pv/view/decodetrace.h index b2ff2b5..4b3bc3d 100644 --- a/pv/view/decodetrace.h +++ b/pv/view/decodetrace.h @@ -154,7 +154,7 @@ private: void commit_probes(); -private slots: +private Q_SLOTS: void on_new_decode_data(); void on_delete(); diff --git a/pv/view/header.h b/pv/view/header.h index eed1d1e..7759652 100644 --- a/pv/view/header.h +++ b/pv/view/header.h @@ -73,14 +73,14 @@ private: void keyPressEvent(QKeyEvent *e); -private slots: +private Q_SLOTS: void on_signals_changed(); void on_signals_moved(); void on_trace_changed(); -signals: +Q_SIGNALS: void signals_moved(); private: diff --git a/pv/view/logicsignal.h b/pv/view/logicsignal.h index de1f2ec..4e10d71 100644 --- a/pv/view/logicsignal.h +++ b/pv/view/logicsignal.h @@ -87,7 +87,7 @@ private: int action_match(QAction *action); void populate_popup_form(QWidget *parent, QFormLayout *form); -private slots: +private Q_SLOTS: void on_trigger(); private: diff --git a/pv/view/marginwidget.h b/pv/view/marginwidget.h index 89eb3de..7811d80 100644 --- a/pv/view/marginwidget.h +++ b/pv/view/marginwidget.h @@ -35,10 +35,10 @@ class MarginWidget : public QWidget public: MarginWidget(pv::view::View &parent); -public slots: +public Q_SLOTS: virtual void clear_selection(); -signals: +Q_SIGNALS: void selection_changed(); void geometry_updated(); diff --git a/pv/view/ruler.h b/pv/view/ruler.h index 08a9c0e..00fac24 100644 --- a/pv/view/ruler.h +++ b/pv/view/ruler.h @@ -66,7 +66,7 @@ private: */ void draw_hover_mark(QPainter &p); -private slots: +private Q_SLOTS: void hover_point_changed(); }; diff --git a/pv/view/signal.h b/pv/view/signal.h index c003de6..d627097 100644 --- a/pv/view/signal.h +++ b/pv/view/signal.h @@ -77,7 +77,7 @@ public: bool eventFilter(QObject *obj, QEvent *evt); -private slots: +private Q_SLOTS: void on_disable(); protected: diff --git a/pv/view/timemarker.h b/pv/view/timemarker.h index fc058c2..ec34fb5 100644 --- a/pv/view/timemarker.h +++ b/pv/view/timemarker.h @@ -88,10 +88,10 @@ public: pv::widgets::Popup* create_popup(QWidget *parent); -private slots: +private Q_SLOTS: void on_value_changed(double value); -signals: +Q_SIGNALS: void time_changed(); protected: diff --git a/pv/view/trace.h b/pv/view/trace.h index b82aaa6..71ad495 100644 --- a/pv/view/trace.h +++ b/pv/view/trace.h @@ -175,14 +175,14 @@ protected: void close_popup(); -private slots: +private Q_SLOTS: void on_text_changed(const QString &text); void on_colour_changed(const QColor &colour); void on_popup_closed(); -signals: +Q_SIGNALS: void visibility_changed(); void text_changed(); void colour_changed(); diff --git a/pv/view/view.h b/pv/view/view.h index 85e990f..021767d 100644 --- a/pv/view/view.h +++ b/pv/view/view.h @@ -136,7 +136,7 @@ public: void update_viewport(); -signals: +Q_SIGNALS: void hover_point_changed(); void signals_moved(); @@ -171,7 +171,7 @@ private: void resizeEvent(QResizeEvent *e); -private slots: +private Q_SLOTS: void h_scroll_value_changed(int value); void v_scroll_value_changed(int value); diff --git a/pv/view/viewport.h b/pv/view/viewport.h index f7c8028..10b88b4 100644 --- a/pv/view/viewport.h +++ b/pv/view/viewport.h @@ -55,7 +55,7 @@ private: void wheelEvent(QWheelEvent *event); bool touchEvent(QTouchEvent *e); -private slots: +private Q_SLOTS: void on_signals_changed(); void on_signals_moved(); diff --git a/pv/widgets/colourbutton.h b/pv/widgets/colourbutton.h index 45a3fff..2e62e43 100644 --- a/pv/widgets/colourbutton.h +++ b/pv/widgets/colourbutton.h @@ -49,12 +49,12 @@ public: private: void paintEvent(QPaintEvent *e); -private slots: +private Q_SLOTS: void on_clicked(bool); void on_selected(int row, int col); -signals: +Q_SIGNALS: void selected(const QColor &colour); private: diff --git a/pv/widgets/colourpopup.h b/pv/widgets/colourpopup.h index 4f5c52e..4f22762 100644 --- a/pv/widgets/colourpopup.h +++ b/pv/widgets/colourpopup.h @@ -38,10 +38,10 @@ public: QWellArray& well_array(); -signals: +Q_SIGNALS: void selected(int row, int col); -private slots: +private Q_SLOTS: void colour_selected(int, int); private: diff --git a/pv/widgets/decodergroupbox.h b/pv/widgets/decodergroupbox.h index 2302a97..e295391 100644 --- a/pv/widgets/decodergroupbox.h +++ b/pv/widgets/decodergroupbox.h @@ -40,7 +40,7 @@ public: void set_decoder_visible(bool visible); -signals: +Q_SIGNALS: void delete_decoder(); void show_hide_decoder(); diff --git a/pv/widgets/decodermenu.h b/pv/widgets/decodermenu.h index 20dd412..bfe087e 100644 --- a/pv/widgets/decodermenu.h +++ b/pv/widgets/decodermenu.h @@ -40,10 +40,10 @@ private: static int decoder_name_cmp(const void *a, const void *b); -private slots: +private Q_SLOTS: void on_action(QObject *action); -signals: +Q_SIGNALS: void decoder_selected(srd_decoder *decoder); private: diff --git a/pv/widgets/popup.h b/pv/widgets/popup.h index 0bc6d0f..ec12304 100644 --- a/pv/widgets/popup.h +++ b/pv/widgets/popup.h @@ -79,7 +79,7 @@ private: protected: void showEvent(QShowEvent *e); -signals: +Q_SIGNALS: void closed(); private: diff --git a/pv/widgets/popuptoolbutton.h b/pv/widgets/popuptoolbutton.h index b619b6f..bbc04f5 100644 --- a/pv/widgets/popuptoolbutton.h +++ b/pv/widgets/popuptoolbutton.h @@ -39,7 +39,7 @@ public: void set_popup(Popup *popup); -private slots: +private Q_SLOTS: void on_clicked(bool); private: diff --git a/pv/widgets/sweeptimingwidget.h b/pv/widgets/sweeptimingwidget.h index b66188f..fc83c20 100644 --- a/pv/widgets/sweeptimingwidget.h +++ b/pv/widgets/sweeptimingwidget.h @@ -55,7 +55,7 @@ public: uint64_t value() const; void set_value(uint64_t value); -signals: +Q_SIGNALS: void value_changed(); private: diff --git a/pv/widgets/wellarray.cpp b/pv/widgets/wellarray.cpp index dcc3b41..fb67443 100644 --- a/pv/widgets/wellarray.cpp +++ b/pv/widgets/wellarray.cpp @@ -217,7 +217,7 @@ void QWellArray::setSelected(int row, int col) updateCell(oldRow, oldCol); updateCell(selRow, selCol); if (row >= 0) - emit selected(row, col); + Q_EMIT selected(row, col); } void QWellArray::focusInEvent(QFocusEvent*) diff --git a/pv/widgets/wellarray.h b/pv/widgets/wellarray.h index dad088c..ebe3c00 100644 --- a/pv/widgets/wellarray.h +++ b/pv/widgets/wellarray.h @@ -104,7 +104,7 @@ public: inline void updateCell(int row, int column) { update(cellGeometry(row, column)); } -signals: +Q_SIGNALS: void selected(int row, int col); protected: diff --git a/signalhandler.cpp b/signalhandler.cpp index 8c9244b..a236535 100644 --- a/signalhandler.cpp +++ b/signalhandler.cpp @@ -75,10 +75,10 @@ void SignalHandler::on_socket_notifier_activated() switch(sig_number) { case SIGINT: - emit int_received(); + Q_EMIT int_received(); break; case SIGTERM: - emit term_received(); + Q_EMIT term_received(); break; } diff --git a/signalhandler.h b/signalhandler.h index 7ecd612..9ca995f 100644 --- a/signalhandler.h +++ b/signalhandler.h @@ -35,11 +35,11 @@ public: public: explicit SignalHandler(QObject* parent = NULL); -signals: +Q_SIGNALS: void int_received(); void term_received(); -private slots: +private Q_SLOTS: void on_socket_notifier_activated(); private: