From 82d696913be4694ffb23bf817d7104ea2bbe2c82 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patrick=20Jos=C3=A9=20Pereira?= Date: Sat, 27 Oct 2018 11:41:45 -0300 Subject: [PATCH] ui: Move to pragma once MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Patrick José Pereira --- src/ui/HILDockWidget.h | 6 ++---- src/ui/MAVLinkDecoder.h | 4 +--- src/ui/MainWindow.h | 6 ++---- src/ui/MultiVehicleDockWidget.h | 6 ++---- src/ui/QGCHilConfiguration.h | 6 ++---- src/ui/QGCHilFlightGearConfiguration.h | 4 +--- src/ui/QGCHilJSBSimConfiguration.h | 4 +--- src/ui/QGCHilXPlaneConfiguration.h | 4 +--- src/ui/QGCMAVLinkInspector.h | 4 +--- src/ui/QGCMAVLinkLogPlayer.h | 4 +--- src/ui/QGCMapRCToParamDialog.h | 6 ++---- src/ui/QGCPluginHost.h | 4 +--- src/ui/QGCUASFileView.h | 6 ++---- src/ui/QGCUASFileViewMulti.h | 4 +--- src/ui/linechart/ChartPlot.h | 4 +--- src/ui/linechart/IncrementalPlot.h | 6 ++---- src/ui/linechart/LinechartPlot.h | 6 ++---- src/ui/linechart/LinechartWidget.h | 6 ++---- src/ui/linechart/Linecharts.h | 4 +--- src/ui/linechart/ScrollZoomer.h | 4 +--- src/ui/linechart/Scrollbar.h | 5 +---- src/ui/uas/QGCUnconnectedInfoWidget.h | 4 +--- 22 files changed, 31 insertions(+), 76 deletions(-) diff --git a/src/ui/HILDockWidget.h b/src/ui/HILDockWidget.h index d2d14e3a72..5e75bb3c5f 100644 --- a/src/ui/HILDockWidget.h +++ b/src/ui/HILDockWidget.h @@ -1,6 +1,6 @@ /**************************************************************************** * - * (c) 2009-2016 QGROUNDCONTROL PROJECT + * (c) 2009-2018 QGROUNDCONTROL PROJECT * * QGroundControl is licensed according to the terms in the file * COPYING.md in the root of the source code directory. @@ -8,8 +8,7 @@ ****************************************************************************/ -#ifndef HILDockWidget_H -#define HILDockWidget_H +#pragma once #include "MultiVehicleDockWidget.h" @@ -26,4 +25,3 @@ protected: virtual QWidget* _newVehicleWidget(Vehicle* vehicle, QWidget* parent); }; -#endif diff --git a/src/ui/MAVLinkDecoder.h b/src/ui/MAVLinkDecoder.h index 9f715bace9..50df5e105b 100644 --- a/src/ui/MAVLinkDecoder.h +++ b/src/ui/MAVLinkDecoder.h @@ -1,5 +1,4 @@ -#ifndef MAVLINKDECODER_H -#define MAVLINKDECODER_H +#pragma once #include #include @@ -53,4 +52,3 @@ protected: QThread* creationThread; ///< QThread on which the object is created }; -#endif // MAVLINKDECODER_H diff --git a/src/ui/MainWindow.h b/src/ui/MainWindow.h index 40ffafb45b..98c2897b15 100644 --- a/src/ui/MainWindow.h +++ b/src/ui/MainWindow.h @@ -1,6 +1,6 @@ /**************************************************************************** * - * (c) 2009-2016 QGROUNDCONTROL PROJECT + * (c) 2009-2018 QGROUNDCONTROL PROJECT * * QGroundControl is licensed according to the terms in the file * COPYING.md in the root of the source code directory. @@ -15,8 +15,7 @@ * */ -#ifndef _MAINWINDOW_H_ -#define _MAINWINDOW_H_ +#pragma once #ifdef __mobile__ #error Should not be include in mobile build @@ -181,4 +180,3 @@ private: QString _getWindowGeometryKey(); }; -#endif /* _MAINWINDOW_H_ */ diff --git a/src/ui/MultiVehicleDockWidget.h b/src/ui/MultiVehicleDockWidget.h index d22a6c06ba..12557b1031 100644 --- a/src/ui/MultiVehicleDockWidget.h +++ b/src/ui/MultiVehicleDockWidget.h @@ -1,6 +1,6 @@ /**************************************************************************** * - * (c) 2009-2016 QGROUNDCONTROL PROJECT + * (c) 2009-2018 QGROUNDCONTROL PROJECT * * QGroundControl is licensed according to the terms in the file * COPYING.md in the root of the source code directory. @@ -8,8 +8,7 @@ ****************************************************************************/ -#ifndef MultiVehicleDockWidget_H -#define MultiVehicleDockWidget_H +#pragma once #include @@ -51,4 +50,3 @@ private: Ui::MultiVehicleDockWidget* _ui; }; -#endif diff --git a/src/ui/QGCHilConfiguration.h b/src/ui/QGCHilConfiguration.h index ffcb2f440e..331fef97d1 100644 --- a/src/ui/QGCHilConfiguration.h +++ b/src/ui/QGCHilConfiguration.h @@ -1,6 +1,6 @@ /**************************************************************************** * - * (c) 2009-2016 QGROUNDCONTROL PROJECT + * (c) 2009-2018 QGROUNDCONTROL PROJECT * * QGroundControl is licensed according to the terms in the file * COPYING.md in the root of the source code directory. @@ -8,8 +8,7 @@ ****************************************************************************/ -#ifndef QGCHILCONFIGURATION_H -#define QGCHILCONFIGURATION_H +#pragma once #include @@ -41,4 +40,3 @@ private: Ui::QGCHilConfiguration *ui; }; -#endif // QGCHILCONFIGURATION_H diff --git a/src/ui/QGCHilFlightGearConfiguration.h b/src/ui/QGCHilFlightGearConfiguration.h index 6ebd999b6f..e69176fe72 100644 --- a/src/ui/QGCHilFlightGearConfiguration.h +++ b/src/ui/QGCHilFlightGearConfiguration.h @@ -1,5 +1,4 @@ -#ifndef QGCHILFLIGHTGEARCONFIGURATION_H -#define QGCHILFLIGHTGEARCONFIGURATION_H +#pragma once #include @@ -53,4 +52,3 @@ signals: void barometerOffsetChanged(float barometerOffsetkPa); }; -#endif // QGCHILFLIGHTGEARCONFIGURATION_H diff --git a/src/ui/QGCHilJSBSimConfiguration.h b/src/ui/QGCHilJSBSimConfiguration.h index b03bdf4a0f..99ce61b261 100644 --- a/src/ui/QGCHilJSBSimConfiguration.h +++ b/src/ui/QGCHilJSBSimConfiguration.h @@ -1,5 +1,4 @@ -#ifndef QGCHILJSBSIMCONFIGURATION_H -#define QGCHILJSBSIMCONFIGURATION_H +#pragma once #include @@ -29,4 +28,3 @@ private: Ui::QGCHilJSBSimConfiguration *ui; }; -#endif // QGCHILJSBSIMCONFIGURATION_H diff --git a/src/ui/QGCHilXPlaneConfiguration.h b/src/ui/QGCHilXPlaneConfiguration.h index e03e232d86..082625188f 100644 --- a/src/ui/QGCHilXPlaneConfiguration.h +++ b/src/ui/QGCHilXPlaneConfiguration.h @@ -1,5 +1,4 @@ -#ifndef QGCHILXPLANECONFIGURATION_H -#define QGCHILXPLANECONFIGURATION_H +#pragma once #include @@ -31,4 +30,3 @@ private: Ui::QGCHilXPlaneConfiguration *ui; }; -#endif // QGCHILXPLANECONFIGURATION_H diff --git a/src/ui/QGCMAVLinkInspector.h b/src/ui/QGCMAVLinkInspector.h index cd5084d669..3953beab03 100644 --- a/src/ui/QGCMAVLinkInspector.h +++ b/src/ui/QGCMAVLinkInspector.h @@ -1,5 +1,4 @@ -#ifndef QGCMAVLINKINSPECTOR_H -#define QGCMAVLINKINSPECTOR_H +#pragma once #include #include @@ -72,4 +71,3 @@ private: Ui::QGCMAVLinkInspector *ui; }; -#endif // QGCMAVLINKINSPECTOR_H diff --git a/src/ui/QGCMAVLinkLogPlayer.h b/src/ui/QGCMAVLinkLogPlayer.h index f83d268347..dfa80e254c 100644 --- a/src/ui/QGCMAVLinkLogPlayer.h +++ b/src/ui/QGCMAVLinkLogPlayer.h @@ -1,5 +1,4 @@ -#ifndef QGCMAVLINKLOGPLAYER_H -#define QGCMAVLINKLOGPLAYER_H +#pragma once #include #include @@ -56,4 +55,3 @@ private: Ui::QGCMAVLinkLogPlayer* _ui; }; -#endif diff --git a/src/ui/QGCMapRCToParamDialog.h b/src/ui/QGCMapRCToParamDialog.h index 723849402c..56a46bc3d2 100644 --- a/src/ui/QGCMapRCToParamDialog.h +++ b/src/ui/QGCMapRCToParamDialog.h @@ -1,6 +1,6 @@ /**************************************************************************** * - * (c) 2009-2016 QGROUNDCONTROL PROJECT + * (c) 2009-2018 QGROUNDCONTROL PROJECT * * QGroundControl is licensed according to the terms in the file * COPYING.md in the root of the source code directory. @@ -12,8 +12,7 @@ /// @brief Dialog to configure RC to parameter mapping /// @author Thomas Gubler -#ifndef QGCMAPRCTOPARAMDIALOG_H -#define QGCMAPRCTOPARAMDIALOG_H +#pragma once #include #include @@ -57,4 +56,3 @@ private: Ui::QGCMapRCToParamDialog* ui; }; -#endif // QGCMAPRCTOPARAMDIALOG_H diff --git a/src/ui/QGCPluginHost.h b/src/ui/QGCPluginHost.h index fe78e6cad0..c732d6b348 100644 --- a/src/ui/QGCPluginHost.h +++ b/src/ui/QGCPluginHost.h @@ -1,5 +1,4 @@ -#ifndef QGCPLUGINHOST_H -#define QGCPLUGINHOST_H +#pragma once #include @@ -19,4 +18,3 @@ private: Ui::QGCPluginHost *ui; }; -#endif // QGCPLUGINHOST_H diff --git a/src/ui/QGCUASFileView.h b/src/ui/QGCUASFileView.h index a7740056a4..86e74dfdf9 100644 --- a/src/ui/QGCUASFileView.h +++ b/src/ui/QGCUASFileView.h @@ -1,6 +1,6 @@ /**************************************************************************** * - * (c) 2009-2016 QGROUNDCONTROL PROJECT + * (c) 2009-2018 QGROUNDCONTROL PROJECT * * QGroundControl is licensed according to the terms in the file * COPYING.md in the root of the source code directory. @@ -8,8 +8,7 @@ ****************************************************************************/ -#ifndef QGCUASFILEVIEW_H -#define QGCUASFILEVIEW_H +#pragma once #include #include @@ -64,4 +63,3 @@ private: CommandState _currentCommand; ///< Current active command }; -#endif // QGCUASFILEVIEW_H diff --git a/src/ui/QGCUASFileViewMulti.h b/src/ui/QGCUASFileViewMulti.h index eedc93695c..69c05e1157 100644 --- a/src/ui/QGCUASFileViewMulti.h +++ b/src/ui/QGCUASFileViewMulti.h @@ -1,5 +1,4 @@ -#ifndef QGCUASFILEVIEWMULTI_H -#define QGCUASFILEVIEWMULTI_H +#pragma once #include @@ -33,4 +32,3 @@ private: Ui::QGCUASFileViewMulti *ui; }; -#endif // QGCUASFILEVIEWMULTI_H diff --git a/src/ui/linechart/ChartPlot.h b/src/ui/linechart/ChartPlot.h index 1a6a5b52a3..51a7892bbd 100644 --- a/src/ui/linechart/ChartPlot.h +++ b/src/ui/linechart/ChartPlot.h @@ -1,5 +1,4 @@ -#ifndef CHARTPLOT_H -#define CHARTPLOT_H +#pragma once #include #include @@ -42,4 +41,3 @@ protected: float _gridWidth; ///< Width of gridlines in pixels }; -#endif // CHARTPLOT_H diff --git a/src/ui/linechart/IncrementalPlot.h b/src/ui/linechart/IncrementalPlot.h index 75133766de..422641df3c 100644 --- a/src/ui/linechart/IncrementalPlot.h +++ b/src/ui/linechart/IncrementalPlot.h @@ -1,6 +1,6 @@ /**************************************************************************** * - * (c) 2009-2016 QGROUNDCONTROL PROJECT + * (c) 2009-2018 QGROUNDCONTROL PROJECT * * QGroundControl is licensed according to the terms in the file * COPYING.md in the root of the source code directory. @@ -15,8 +15,7 @@ * */ -#ifndef INCREMENTALPLOT_H -#define INCREMENTALPLOT_H +#pragma once #include #include @@ -117,4 +116,3 @@ private: void updateStyle(QwtPlotCurve *curve); }; -#endif /* INCREMENTALPLOT_H */ diff --git a/src/ui/linechart/LinechartPlot.h b/src/ui/linechart/LinechartPlot.h index 2d6e38e9f0..2a21e531b9 100644 --- a/src/ui/linechart/LinechartPlot.h +++ b/src/ui/linechart/LinechartPlot.h @@ -1,6 +1,6 @@ /**************************************************************************** * - * (c) 2009-2016 QGROUNDCONTROL PROJECT + * (c) 2009-2018 QGROUNDCONTROL PROJECT * * QGroundControl is licensed according to the terms in the file * COPYING.md in the root of the source code directory. @@ -16,8 +16,7 @@ * */ -#ifndef _LINECHARTPLOT_H_ -#define _LINECHARTPLOT_H_ +#pragma once #define QUINT64_MIN Q_UINT64_C(0) #define QUINT64_MAX Q_UINT64_C(18446744073709551615) @@ -296,4 +295,3 @@ signals: void windowPositionChanged(quint64 position); }; -#endif // _LINECHARTPLOT_H_ diff --git a/src/ui/linechart/LinechartWidget.h b/src/ui/linechart/LinechartWidget.h index 99e61caea7..1fdd63ab4a 100644 --- a/src/ui/linechart/LinechartWidget.h +++ b/src/ui/linechart/LinechartWidget.h @@ -1,6 +1,6 @@ /**************************************************************************** * - * (c) 2009-2016 QGROUNDCONTROL PROJECT + * (c) 2009-2018 QGROUNDCONTROL PROJECT * * QGroundControl is licensed according to the terms in the file * COPYING.md in the root of the source code directory. @@ -15,8 +15,7 @@ * @author Lorenz Meier * @author Thomas Gubler */ -#ifndef LINECHARTWIDGET_H -#define LINECHARTWIDGET_H +#pragma once #include #include @@ -202,4 +201,3 @@ private: QTimer _filterTimer; }; -#endif // LINECHARTWIDGET_H diff --git a/src/ui/linechart/Linecharts.h b/src/ui/linechart/Linecharts.h index 198667118c..c50fe54601 100644 --- a/src/ui/linechart/Linecharts.h +++ b/src/ui/linechart/Linecharts.h @@ -1,5 +1,4 @@ -#ifndef LINECHARTS_H -#define LINECHARTS_H +#pragma once #include #include @@ -29,4 +28,3 @@ private: MAVLinkDecoder* _mavlinkDecoder; }; -#endif // LINECHARTS_H diff --git a/src/ui/linechart/ScrollZoomer.h b/src/ui/linechart/ScrollZoomer.h index fbbbe18f26..c89ebe79de 100644 --- a/src/ui/linechart/ScrollZoomer.h +++ b/src/ui/linechart/ScrollZoomer.h @@ -1,5 +1,4 @@ -#ifndef _SCROLLZOOMER_H -#define _SCROLLZOOMER_H +#pragma once #include #if QT_VERSION < 0x040000 @@ -73,4 +72,3 @@ private: bool d_inZoom; }; -#endif diff --git a/src/ui/linechart/Scrollbar.h b/src/ui/linechart/Scrollbar.h index 0587dd0fcc..7466014cb3 100644 --- a/src/ui/linechart/Scrollbar.h +++ b/src/ui/linechart/Scrollbar.h @@ -1,5 +1,4 @@ -#ifndef _SCROLLBAR_H -#define _SCROLLBAR_H 1 +#pragma once #include @@ -49,5 +48,3 @@ private: double d_maxBase; int d_baseTicks; }; - -#endif diff --git a/src/ui/uas/QGCUnconnectedInfoWidget.h b/src/ui/uas/QGCUnconnectedInfoWidget.h index 60a522f06b..a38943f043 100644 --- a/src/ui/uas/QGCUnconnectedInfoWidget.h +++ b/src/ui/uas/QGCUnconnectedInfoWidget.h @@ -1,5 +1,4 @@ -#ifndef QGCUNCONNECTEDINFOWIDGET_H -#define QGCUNCONNECTEDINFOWIDGET_H +#pragma once #include @@ -35,4 +34,3 @@ public slots: void addLink(); }; -#endif // QGCUNCONNECTEDINFOWIDGET_H -- GitLab