From e9213170687cf4afd14e20acdc690ff9381d94ae Mon Sep 17 00:00:00 2001 From: Martin Ling Date: Sat, 19 Jul 2014 19:15:55 +0100 Subject: [PATCH] Don't use Qt-defined keywords, they can cause problems with other headers. --- CMakeLists.txt | 2 +- pv/data/decoderstack.h | 4 ++-- pv/device/devinst.h | 2 +- pv/dialogs/connect.h | 2 +- pv/dialogs/storeprogress.h | 2 +- pv/mainwindow.h | 2 +- pv/popups/probes.h | 2 +- pv/prop/bool.h | 2 +- pv/prop/double.h | 2 +- pv/prop/enum.h | 2 +- pv/prop/int.h | 2 +- pv/prop/string.h | 2 +- pv/sigsession.h | 2 +- pv/storesession.h | 2 +- pv/toolbars/samplingbar.h | 4 ++-- pv/view/decodetrace.h | 2 +- pv/view/header.h | 4 ++-- pv/view/logicsignal.h | 2 +- pv/view/marginwidget.h | 4 ++-- pv/view/ruler.h | 2 +- pv/view/signal.h | 2 +- pv/view/timemarker.h | 4 ++-- pv/view/trace.h | 4 ++-- pv/view/view.h | 4 ++-- pv/view/viewport.h | 2 +- pv/widgets/colourbutton.h | 4 ++-- pv/widgets/colourpopup.h | 4 ++-- pv/widgets/decodergroupbox.h | 2 +- pv/widgets/decodermenu.h | 4 ++-- pv/widgets/popup.h | 2 +- pv/widgets/popuptoolbutton.h | 2 +- pv/widgets/sweeptimingwidget.h | 2 +- pv/widgets/wellarray.cpp | 2 +- pv/widgets/wellarray.h | 2 +- signalhandler.cpp | 4 ++-- signalhandler.h | 4 ++-- 36 files changed, 48 insertions(+), 48 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 069ccd89..a8cd6c7b 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 16a7c0cf..35f76874 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 0443d3ea..4f0b6dec 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 a3f05ee1..e1a2c30d 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 7d53832a..eaf235f3 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 f026e8f3..41c55ba5 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 4265c159..434d0398 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 0d8e205e..c96c87af 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 ba4c5958..0dd0ba37 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 a7e6ed8d..eff6647a 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 6d910cdf..1a3180a1 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 d54635fe..01c7e78b 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 d1f11ea9..a06de7e1 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 ffe1facd..83664274 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 2c2431c4..0f4c2ee5 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 b2ff2b59..4b3bc3de 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 eed1d1e1..7759652e 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 de1f2ec8..4e10d717 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 89eb3de1..7811d80a 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 08a9c0e1..00fac244 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 c003de69..d6270972 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 fc058c27..ec34fb56 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 b82aaa6f..71ad4953 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 85e990f7..021767db 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 f7c80287..10b88b4c 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 45a3ffff..2e62e43c 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 4f5c52e3..4f227628 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 2302a979..e2953917 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 20dd4120..bfe087e9 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 0bc6d0ff..ec123048 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 b619b6fd..bbc04f5e 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 b66188fa..fc83c204 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 dcc3b417..fb674431 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 dad088cc..ebe3c000 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 8c9244b3..a236535c 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 7ecd6129..9ca995f7 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: -- 2.30.2