From cd129c235756e7d28bd987986e1948a991984546 Mon Sep 17 00:00:00 2001
From: Harriet Brown <harriet.brown@stfc.ac.uk>
Date: Tue, 10 Mar 2020 16:35:46 +0000
Subject: [PATCH] Replace header guards in MantidPlot with pragma once

This commit replaces all header guards in MantidPlot with #pragma once.
---
 MantidPlot/src/ApplicationWindow.h                          | 6 ++----
 MantidPlot/src/ArrowMarker.h                                | 6 ++----
 MantidPlot/src/AssociationsDialog.h                         | 5 +----
 MantidPlot/src/AxesDialog.h                                 | 5 +----
 MantidPlot/src/AxisDetails.h                                | 6 ++----
 MantidPlot/src/Bar.h                                        | 5 +----
 MantidPlot/src/BoxCurve.h                                   | 5 +----
 MantidPlot/src/ColorMapDialog.h                             | 5 +----
 MantidPlot/src/Cone3D.h                                     | 5 +----
 MantidPlot/src/ConfigDialog.h                               | 5 +----
 MantidPlot/src/ContourLinesEditor.h                         | 5 +----
 MantidPlot/src/Convolution.h                                | 5 +----
 MantidPlot/src/Correlation.h                                | 5 +----
 MantidPlot/src/CurveRangeDialog.h                           | 5 +----
 MantidPlot/src/CurvesDialog.h                               | 5 +----
 MantidPlot/src/CustomActionDialog.h                         | 6 ++----
 MantidPlot/src/DataPickerTool.h                             | 5 +----
 MantidPlot/src/DataSetDialog.h                              | 5 +----
 MantidPlot/src/Differentiation.h                            | 6 ++----
 MantidPlot/src/DockedWindow.h                               | 5 +----
 MantidPlot/src/ErrDialog.h                                  | 5 +----
 MantidPlot/src/ExpDecayDialog.h                             | 5 +----
 MantidPlot/src/ExponentialFit.h                             | 6 ++----
 MantidPlot/src/ExportDialog.h                               | 5 +----
 MantidPlot/src/FFT.h                                        | 5 +----
 MantidPlot/src/FFTDialog.h                                  | 5 +----
 MantidPlot/src/FFTFilter.h                                  | 5 +----
 MantidPlot/src/Filter.h                                     | 5 +----
 MantidPlot/src/FilterDialog.h                               | 5 +----
 MantidPlot/src/FindDialog.h                                 | 5 +----
 MantidPlot/src/Fit.h                                        | 5 +----
 MantidPlot/src/FitDialog.h                                  | 6 ++----
 MantidPlot/src/FitModelHandler.h                            | 5 +----
 MantidPlot/src/FloatingWindow.h                             | 5 +----
 MantidPlot/src/Folder.h                                     | 5 +----
 MantidPlot/src/FunctionCurve.h                              | 5 +----
 MantidPlot/src/FunctionDialog.h                             | 5 +----
 MantidPlot/src/Graph.h                                      | 5 +----
 MantidPlot/src/Graph3D.h                                    | 5 +----
 MantidPlot/src/Grid.h                                       | 5 +----
 MantidPlot/src/GridDetails.h                                | 6 ++----
 MantidPlot/src/ImageDialog.h                                | 5 +----
 MantidPlot/src/ImageExportDialog.h                          | 5 +----
 MantidPlot/src/ImageMarker.h                                | 5 +----
 MantidPlot/src/ImportASCIIDialog.h                          | 5 +----
 MantidPlot/src/IntDialog.h                                  | 5 +----
 MantidPlot/src/Integration.h                                | 5 +----
 MantidPlot/src/Interpolation.h                              | 5 +----
 MantidPlot/src/InterpolationDialog.h                        | 5 +----
 MantidPlot/src/LabelTool.h                                  | 5 +----
 MantidPlot/src/LayerDialog.h                                | 5 +----
 MantidPlot/src/LegendWidget.h                               | 5 +----
 MantidPlot/src/LineDialog.h                                 | 5 +----
 MantidPlot/src/LineProfileTool.h                            | 5 +----
 MantidPlot/src/LogisticFit.h                                | 5 +----
 MantidPlot/src/Mantid/AlgorithmDockWidget.h                 | 6 ++----
 MantidPlot/src/Mantid/AlgorithmMonitor.h                    | 5 +----
 MantidPlot/src/Mantid/ErrorBarSettings.h                    | 5 +----
 MantidPlot/src/Mantid/FirstTimeSetup.h                      | 5 +----
 MantidPlot/src/Mantid/FitParameterTie.h                     | 5 +----
 MantidPlot/src/Mantid/IFunctionWrapper.h                    | 5 +----
 MantidPlot/src/Mantid/IMantidMatrixExtensionHandler.h       | 6 ++----
 MantidPlot/src/Mantid/ImportWorkspaceDlg.h                  | 5 +----
 MantidPlot/src/Mantid/InputHistory.h                        | 5 +----
 MantidPlot/src/Mantid/InstrumentWidget/InstrumentWindow.h   | 5 +----
 MantidPlot/src/Mantid/LabelToolLogValuesDialog.h            | 5 +----
 MantidPlot/src/Mantid/ManageCustomMenus.h                   | 5 +----
 MantidPlot/src/Mantid/ManageInterfaceCategories.h           | 5 +----
 MantidPlot/src/Mantid/MantidAbout.h                         | 5 +----
 MantidPlot/src/Mantid/MantidApplication.h                   | 5 +----
 MantidPlot/src/Mantid/MantidCurve.h                         | 5 +----
 MantidPlot/src/Mantid/MantidMDCurve.h                       | 5 +----
 MantidPlot/src/Mantid/MantidMDCurveDialog.h                 | 5 +----
 MantidPlot/src/Mantid/MantidMatrix.h                        | 5 +----
 MantidPlot/src/Mantid/MantidMatrixCurve.h                   | 5 +----
 MantidPlot/src/Mantid/MantidMatrixDialog.h                  | 5 +----
 MantidPlot/src/Mantid/MantidMatrixDxExtensionHandler.h      | 6 ++----
 MantidPlot/src/Mantid/MantidMatrixExtensionRequest.h        | 5 +----
 MantidPlot/src/Mantid/MantidMatrixFunction.h                | 5 +----
 MantidPlot/src/Mantid/MantidMatrixModel.h                   | 5 +----
 MantidPlot/src/Mantid/MantidMatrixNullExtensionHandler.h    | 6 ++----
 MantidPlot/src/Mantid/MantidMatrixTabExtension.h            | 6 ++----
 MantidPlot/src/Mantid/MantidPlotUtilities.h                 | 5 +----
 MantidPlot/src/Mantid/MantidSampleLogDialog.h               | 5 +----
 MantidPlot/src/Mantid/MantidSampleMaterialDialog.h          | 5 +----
 MantidPlot/src/Mantid/MantidSurfaceContourPlotGenerator.h   | 5 +----
 MantidPlot/src/Mantid/MantidTable.h                         | 5 +----
 MantidPlot/src/Mantid/MantidUI.h                            | 5 +----
 MantidPlot/src/Mantid/PeakPickerTool.h                      | 5 +----
 MantidPlot/src/Mantid/Preferences.h                         | 5 +----
 MantidPlot/src/Mantid/RemoveErrorsDialog.h                  | 5 +----
 MantidPlot/src/Mantid/ReportUsageDisableDialog.h            | 5 +----
 MantidPlot/src/Mantid/SampleLogDialogBase.h                 | 5 +----
 MantidPlot/src/Mantid/UserFitFunctionDialog.h               | 5 +----
 MantidPlot/src/Matrix.h                                     | 5 +----
 MantidPlot/src/MatrixCommand.h                              | 6 ++----
 MantidPlot/src/MatrixDialog.h                               | 5 +----
 MantidPlot/src/MatrixModel.h                                | 5 +----
 MantidPlot/src/MatrixSizeDialog.h                           | 5 +----
 MantidPlot/src/MatrixValuesDialog.h                         | 5 +----
 MantidPlot/src/MdPlottingCmapsProvider.h                    | 5 +----
 MantidPlot/src/MdiSubWindow.h                               | 5 +----
 MantidPlot/src/MenuWithToolTips.h                           | 5 +----
 MantidPlot/src/MultiLayer.h                                 | 5 +----
 MantidPlot/src/MultiPeakFit.h                               | 6 ++----
 MantidPlot/src/MultiPeakFitTool.h                           | 5 +----
 MantidPlot/src/MultiTabScriptInterpreter.h                  | 5 +----
 MantidPlot/src/MyParser.h                                   | 5 +----
 MantidPlot/src/NonLinearFit.h                               | 6 ++----
 MantidPlot/src/Note.h                                       | 5 +----
 MantidPlot/src/OpenProjectDialog.h                          | 5 +----
 MantidPlot/src/Plot.h                                       | 6 ++----
 MantidPlot/src/Plot3DDialog.h                               | 5 +----
 MantidPlot/src/PlotCurve.h                                  | 6 ++----
 MantidPlot/src/PlotDialog.h                                 | 5 +----
 MantidPlot/src/PlotToolInterface.h                          | 5 +----
 MantidPlot/src/PlotWizard.h                                 | 5 +----
 MantidPlot/src/PluginFit.h                                  | 6 ++----
 MantidPlot/src/PolynomFitDialog.h                           | 5 +----
 MantidPlot/src/PolynomialFit.h                              | 6 ++----
 MantidPlot/src/PrecompiledHeader.h                          | 5 +----
 MantidPlot/src/Processes.h                                  | 6 ++----
 MantidPlot/src/ProjectRecovery.h                            | 5 +----
 MantidPlot/src/ProjectRecoveryGUIs/ProjectRecoveryModel.h   | 5 +----
 .../src/ProjectRecoveryGUIs/ProjectRecoveryPresenter.h      | 5 +----
 MantidPlot/src/ProjectRecoveryGUIs/ProjectRecoveryView.h    | 5 +----
 MantidPlot/src/ProjectRecoveryGUIs/RecoveryFailureView.h    | 5 +----
 MantidPlot/src/ProjectRecoveryGUIs/RecoveryThread.h         | 5 +----
 MantidPlot/src/ProjectSaveView.h                            | 6 ++----
 MantidPlot/src/ProjectSerialiser.h                          | 5 +----
 MantidPlot/src/PythonScript.h                               | 5 +----
 MantidPlot/src/PythonScripting.h                            | 5 +----
 MantidPlot/src/QwtBarCurve.h                                | 5 +----
 MantidPlot/src/QwtErrorPlotCurve.h                          | 5 +----
 MantidPlot/src/RangeSelectorTool.h                          | 5 +----
 MantidPlot/src/RenameWindowDialog.h                         | 5 +----
 MantidPlot/src/ScaleDetails.h                               | 5 +----
 MantidPlot/src/ScaleDraw.h                                  | 6 ++----
 MantidPlot/src/ScreenPickerTool.h                           | 5 +----
 MantidPlot/src/Script.h                                     | 5 +----
 MantidPlot/src/ScriptCode.h                                 | 5 +----
 MantidPlot/src/ScriptFileInterpreter.h                      | 5 +----
 MantidPlot/src/ScriptOutputDisplay.h                        | 5 +----
 MantidPlot/src/Scripted.h                                   | 5 +----
 MantidPlot/src/ScriptingEnv.h                               | 5 +----
 MantidPlot/src/ScriptingLangDialog.h                        | 5 +----
 MantidPlot/src/ScriptingWindow.h                            | 5 +----
 MantidPlot/src/SelectionMoveResizer.h                       | 5 +----
 MantidPlot/src/SendToProgramDialog.h                        | 5 +----
 MantidPlot/src/SetColValuesDialog.h                         | 5 +----
 MantidPlot/src/SigmoidalFit.h                               | 5 +----
 MantidPlot/src/SmoothCurveDialog.h                          | 5 +----
 MantidPlot/src/SmoothFilter.h                               | 5 +----
 MantidPlot/src/SortDialog.h                                 | 5 +----
 MantidPlot/src/Spectrogram.h                                | 5 +----
 MantidPlot/src/SurfaceDialog.h                              | 5 +----
 MantidPlot/src/Table.h                                      | 5 +----
 MantidPlot/src/TableDialog.h                                | 5 +----
 MantidPlot/src/TableStatistics.h                            | 5 +----
 MantidPlot/src/TextDialog.h                                 | 5 +----
 MantidPlot/src/TextEditor.h                                 | 5 +----
 MantidPlot/src/TextFileIO.h                                 | 5 +----
 MantidPlot/src/TiledWindow.h                                | 5 +----
 MantidPlot/src/TranslateCurveTool.h                         | 5 +----
 MantidPlot/src/UserFunction.h                               | 5 +----
 MantidPlot/src/VectorCurve.h                                | 5 +----
 MantidPlot/src/WindowFactory.h                              | 5 +----
 MantidPlot/src/analysis/fft2D.h                             | 5 +----
 MantidPlot/src/customevents.h                               | 5 +----
 MantidPlot/src/fit_gsl.h                                    | 5 +----
 MantidPlot/src/globals.h                                    | 5 +----
 MantidPlot/src/importOPJ.h                                  | 5 +----
 .../src/lib/3rdparty/qtcolorpicker/src/qtcolorpicker.h      | 5 +----
 MantidPlot/src/lib/include/CollapsiveGroupBox.h             | 5 +----
 MantidPlot/src/lib/include/ColorBox.h                       | 5 +----
 MantidPlot/src/lib/include/ColorButton.h                    | 5 +----
 MantidPlot/src/lib/include/ColorMapEditor.h                 | 5 +----
 MantidPlot/src/lib/include/ExtensibleFileDialog.h           | 5 +----
 MantidPlot/src/lib/include/LineNumberDisplay.h              | 6 ++----
 MantidPlot/src/lib/include/PatternBox.h                     | 5 +----
 MantidPlot/src/lib/include/PenStyleBox.h                    | 5 +----
 MantidPlot/src/lib/include/SymbolBox.h                      | 5 +----
 MantidPlot/src/lib/include/SymbolDialog.h                   | 5 +----
 MantidPlot/src/lib/include/TextFormatButtons.h              | 5 +----
 MantidPlot/src/muParserScript.h                             | 5 +----
 MantidPlot/src/muParserScripting.h                          | 5 +----
 MantidPlot/src/nrutil.h                                     | 5 +----
 MantidPlot/src/origin/OPJFile.h                             | 5 +----
 MantidPlot/src/origin/tree.hh                               | 5 +----
 189 files changed, 213 insertions(+), 756 deletions(-)

diff --git a/MantidPlot/src/ApplicationWindow.h b/MantidPlot/src/ApplicationWindow.h
index db0236aa8bd..0bc349a2f26 100644
--- a/MantidPlot/src/ApplicationWindow.h
+++ b/MantidPlot/src/ApplicationWindow.h
@@ -29,8 +29,7 @@ Description          : QtiPlot's main window
  *   Boston, MA  02110-1301  USA                                           *
  *                                                                         *
  ***************************************************************************/
-#ifndef APPLICATION_H
-#define APPLICATION_H
+#pragma once
 
 #include <QBuffer>
 #include <QFile>
@@ -1665,5 +1664,4 @@ private:
 public:
   MantidUI *mantidUI;
   QSettings settings;
-};
-#endif
+};
\ No newline at end of file
diff --git a/MantidPlot/src/ArrowMarker.h b/MantidPlot/src/ArrowMarker.h
index d407988641f..42a55fa68c7 100644
--- a/MantidPlot/src/ArrowMarker.h
+++ b/MantidPlot/src/ArrowMarker.h
@@ -26,8 +26,7 @@
  *   Boston, MA  02110-1301  USA                                           *
  *                                                                         *
  ***************************************************************************/
-#ifndef ARROWMARKER_H
-#define ARROWMARKER_H
+#pragma once
 
 #include <qwt_plot_marker.h>
 
@@ -171,5 +170,4 @@ private:
    * need to remember this bit.
    */
   QPoint d_op_startat;
-};
-#endif
+};
\ No newline at end of file
diff --git a/MantidPlot/src/AssociationsDialog.h b/MantidPlot/src/AssociationsDialog.h
index ff628207aaa..d247ba76570 100644
--- a/MantidPlot/src/AssociationsDialog.h
+++ b/MantidPlot/src/AssociationsDialog.h
@@ -27,8 +27,7 @@
  *   Boston, MA  02110-1301  USA                                           *
  *                                                                         *
  ***************************************************************************/
-#ifndef ASSOCIATIONSDIALOG_H
-#define ASSOCIATIONSDIALOG_H
+#pragma once
 
 #include <QDialog>
 #include <QTableWidgetItem>
@@ -76,5 +75,3 @@ private:
   QPushButton *btnOK, *btnCancel, *btnApply;
   QListWidget *associations;
 };
-
-#endif // ASSOCIATIONSDIALOG_H
diff --git a/MantidPlot/src/AxesDialog.h b/MantidPlot/src/AxesDialog.h
index 53af5530799..2c22a6e3db8 100644
--- a/MantidPlot/src/AxesDialog.h
+++ b/MantidPlot/src/AxesDialog.h
@@ -27,8 +27,7 @@
  *                                                                         *
  ***************************************************************************/
 // Heavily edited and refactored to fix bugs by Keith Brown
-#ifndef AXESDIALOG_H
-#define AXESDIALOG_H
+#pragma once
 
 #include "AxisDetails.h"
 #include "GridDetails.h"
@@ -126,5 +125,3 @@ private:
   QList<GridDetails *> m_Grid_list;
   bool m_generalModified;
 };
-
-#endif
diff --git a/MantidPlot/src/AxisDetails.h b/MantidPlot/src/AxisDetails.h
index d2a78267f6a..dd99ccec566 100644
--- a/MantidPlot/src/AxisDetails.h
+++ b/MantidPlot/src/AxisDetails.h
@@ -13,8 +13,7 @@ from the University of Derby
 @date 15/09/2013
 */
 
-#ifndef AXISDETAILS_H_
-#define AXISDETAILS_H_
+#pragma once
 
 #include <QList>
 #include <QWidget>
@@ -87,5 +86,4 @@ private:
   void setLabelsNumericFormat(int);
   void updateLabelsFormat(int);
   void setBaselineDist(int);
-};
-#endif /* AxisDetails_H_ */
+};
\ No newline at end of file
diff --git a/MantidPlot/src/Bar.h b/MantidPlot/src/Bar.h
index 0a3b63f8c0a..f8297f6ad1e 100644
--- a/MantidPlot/src/Bar.h
+++ b/MantidPlot/src/Bar.h
@@ -27,8 +27,7 @@
  *   Boston, MA  02110-1301  USA                                           *
  *                                                                         *
  ***************************************************************************/
-#ifndef BARS_H
-#define BARS_H
+#pragma once
 
 #include <qwt3d_plot.h>
 
@@ -49,5 +48,3 @@ private:
   double radius_;
   double diag_;
 };
-
-#endif
diff --git a/MantidPlot/src/BoxCurve.h b/MantidPlot/src/BoxCurve.h
index fd0a3014133..55f8019398d 100644
--- a/MantidPlot/src/BoxCurve.h
+++ b/MantidPlot/src/BoxCurve.h
@@ -27,8 +27,7 @@
  *   Boston, MA  02110-1301  USA                                           *
  *                                                                         *
  ***************************************************************************/
-#ifndef BOXCURVE_H
-#define BOXCURVE_H
+#pragma once
 
 #include "PlotCurve.h"
 #include <qwt_plot.h>
@@ -114,5 +113,3 @@ private:
   QwtArray<double> d_y;
   double d_x;
 };
-
-#endif
diff --git a/MantidPlot/src/ColorMapDialog.h b/MantidPlot/src/ColorMapDialog.h
index a923bb516ca..916b1a9d156 100644
--- a/MantidPlot/src/ColorMapDialog.h
+++ b/MantidPlot/src/ColorMapDialog.h
@@ -25,8 +25,7 @@
  *   Boston, MA  02110-1301  USA                                           *
  *                                                                         *
  ***************************************************************************/
-#ifndef COLORMAPDIALOG_H
-#define COLORMAPDIALOG_H
+#pragma once
 
 #include <QDialog>
 
@@ -49,5 +48,3 @@ private:
   ColorMapEditor *editor;
   Matrix *d_matrix;
 };
-
-#endif
diff --git a/MantidPlot/src/Cone3D.h b/MantidPlot/src/Cone3D.h
index c437673e9a1..3546b87837d 100644
--- a/MantidPlot/src/Cone3D.h
+++ b/MantidPlot/src/Cone3D.h
@@ -28,8 +28,7 @@
  *   Boston, MA  02110-1301  USA                                           *
  *                                                                         *
  ***************************************************************************/
-#ifndef MYCONES_H
-#define MYCONES_H
+#pragma once
 
 #include <qwt3d_plot.h>
 
@@ -52,5 +51,3 @@ private:
   double radius_;
   GLboolean oldstate_;
 };
-
-#endif
diff --git a/MantidPlot/src/ConfigDialog.h b/MantidPlot/src/ConfigDialog.h
index 4d0742e4d49..669c79f9e91 100644
--- a/MantidPlot/src/ConfigDialog.h
+++ b/MantidPlot/src/ConfigDialog.h
@@ -26,8 +26,7 @@ Description          : Preferences dialog
  *   Boston, MA  02110-1301  USA                                           *
  *                                                                         *
  ***************************************************************************/
-#ifndef ConfigDialog_H
-#define ConfigDialog_H
+#pragma once
 
 #include "MantidQtWidgets/Common/MantidDialog.h"
 #include "MantidQtWidgets/Common/MdSettings.h"
@@ -324,5 +323,3 @@ public slots:
   void changeUsageGeneralMdColorMap();
   void changeUsageLastSession();
 };
-
-#endif // CONFIGDIALOG_H
diff --git a/MantidPlot/src/ContourLinesEditor.h b/MantidPlot/src/ContourLinesEditor.h
index 8700c5b2c59..b311142d629 100644
--- a/MantidPlot/src/ContourLinesEditor.h
+++ b/MantidPlot/src/ContourLinesEditor.h
@@ -25,8 +25,7 @@
  *   Boston, MA  02110-1301  USA                                           *
  *                                                                         *
  ***************************************************************************/
-#ifndef CONTOURLINESEDITOR_H
-#define CONTOURLINESEDITOR_H
+#pragma once
 
 #include <QLocale>
 #include <QWidget>
@@ -101,5 +100,3 @@ private:
   int d_pen_index;
   QList<QPen> d_pen_list;
 };
-
-#endif
diff --git a/MantidPlot/src/Convolution.h b/MantidPlot/src/Convolution.h
index 38d85225d19..2d5ce913712 100644
--- a/MantidPlot/src/Convolution.h
+++ b/MantidPlot/src/Convolution.h
@@ -26,8 +26,7 @@
  *   Boston, MA  02110-1301  USA                                           *
  *                                                                         *
  ***************************************************************************/
-#ifndef CONVOLUTION_H
-#define CONVOLUTION_H
+#pragma once
 
 #include "Filter.h"
 
@@ -71,5 +70,3 @@ public:
 private:
   void output() override;
 };
-
-#endif
diff --git a/MantidPlot/src/Correlation.h b/MantidPlot/src/Correlation.h
index 8541047b8c7..d8ad311d38c 100644
--- a/MantidPlot/src/Correlation.h
+++ b/MantidPlot/src/Correlation.h
@@ -26,8 +26,7 @@
  *   Boston, MA  02110-1301  USA                                           *
  *                                                                         *
  ***************************************************************************/
-#ifndef CORRELATION_H
-#define CORRELATION_H
+#pragma once
 
 #include "Filter.h"
 
@@ -49,5 +48,3 @@ protected:
 private:
   void output() override;
 };
-
-#endif
diff --git a/MantidPlot/src/CurveRangeDialog.h b/MantidPlot/src/CurveRangeDialog.h
index 42bb932d04c..3d15437c7c9 100644
--- a/MantidPlot/src/CurveRangeDialog.h
+++ b/MantidPlot/src/CurveRangeDialog.h
@@ -15,8 +15,7 @@
  *   Boston, MA  02110-1301  USA                                           *
  *                                                                         *
  ***************************************************************************/
-#ifndef CURVERANGEDIALOG_H
-#define CURVERANGEDIALOG_H
+#pragma once
 
 #include <QDialog>
 
@@ -47,5 +46,3 @@ private:
   QSpinBox *boxStart;
   QSpinBox *boxEnd;
 };
-
-#endif
diff --git a/MantidPlot/src/CurvesDialog.h b/MantidPlot/src/CurvesDialog.h
index e9415042d72..90fb0c8a74e 100644
--- a/MantidPlot/src/CurvesDialog.h
+++ b/MantidPlot/src/CurvesDialog.h
@@ -27,8 +27,7 @@
  *   Boston, MA  02110-1301  USA                                           *
  *                                                                         *
  ***************************************************************************/
-#ifndef CURVESDIALOG_H
-#define CURVESDIALOG_H
+#pragma once
 
 #include <QDialog>
 #include <QMap>
@@ -91,5 +90,3 @@ private:
   QCheckBox *boxShowCurrentFolder;
   QMap<QString, PlotCurve *> d_plotCurves;
 };
-
-#endif // CurvesDialog_H
diff --git a/MantidPlot/src/CustomActionDialog.h b/MantidPlot/src/CustomActionDialog.h
index 1e85f9ba1f6..7952b11f8f8 100644
--- a/MantidPlot/src/CustomActionDialog.h
+++ b/MantidPlot/src/CustomActionDialog.h
@@ -15,8 +15,7 @@
  *   Boston, MA  02110-1301  USA                                           *
  *                                                                         *
  ***************************************************************************/
-#ifndef CustomActionDialog_H
-#define CustomActionDialog_H
+#pragma once
 
 #include <QDialog>
 #include <QXmlDefaultHandler>
@@ -94,5 +93,4 @@ private:
   QString filePath;
   QString d_widget_name;
   QAction *d_action;
-};
-#endif
+};
\ No newline at end of file
diff --git a/MantidPlot/src/DataPickerTool.h b/MantidPlot/src/DataPickerTool.h
index 8d60ce086c7..6eda33f67c2 100644
--- a/MantidPlot/src/DataPickerTool.h
+++ b/MantidPlot/src/DataPickerTool.h
@@ -28,8 +28,7 @@
  *   Boston, MA  02110-1301  USA                                           *
  *                                                                         *
  ***************************************************************************/
-#ifndef DATA_PICKER_TOOL_H
-#define DATA_PICKER_TOOL_H
+#pragma once
 
 #include "PlotToolInterface.h"
 #include <qwt_plot_marker.h>
@@ -79,5 +78,3 @@ private:
   MoveMode d_move_mode;
   QPoint d_restricted_move_pos;
 };
-
-#endif // ifndef DATA_PICKER_TOOL_H
diff --git a/MantidPlot/src/DataSetDialog.h b/MantidPlot/src/DataSetDialog.h
index 03da260a4c8..dc60ab2abdf 100644
--- a/MantidPlot/src/DataSetDialog.h
+++ b/MantidPlot/src/DataSetDialog.h
@@ -27,8 +27,7 @@
  *   Boston, MA  02110-1301  USA                                           *
  *                                                                         *
  ***************************************************************************/
-#ifndef DATASETDIALOG_H
-#define DATASETDIALOG_H
+#pragma once
 
 #include "ApplicationWindow.h"
 #include <QDialog>
@@ -72,5 +71,3 @@ private:
   QGroupBox *groupBox1;
   QComboBox *boxName;
 };
-
-#endif
diff --git a/MantidPlot/src/Differentiation.h b/MantidPlot/src/Differentiation.h
index 8386ea1c3ca..4f6e205d73d 100644
--- a/MantidPlot/src/Differentiation.h
+++ b/MantidPlot/src/Differentiation.h
@@ -26,8 +26,7 @@
  *   Boston, MA  02110-1301  USA                                           *
  *                                                                         *
  ***************************************************************************/
-#ifndef DIFFERENTIATION_H
-#define DIFFERENTIATION_H
+#pragma once
 
 #include "Filter.h"
 
@@ -46,5 +45,4 @@ public:
 private:
   void init();
   void output() override;
-};
-#endif
+};
\ No newline at end of file
diff --git a/MantidPlot/src/DockedWindow.h b/MantidPlot/src/DockedWindow.h
index 51d575f25d9..56d26caeb50 100644
--- a/MantidPlot/src/DockedWindow.h
+++ b/MantidPlot/src/DockedWindow.h
@@ -4,8 +4,7 @@
 //     NScD Oak Ridge National Laboratory, European Spallation Source
 //     & Institut Laue - Langevin
 // SPDX - License - Identifier: GPL - 3.0 +
-#ifndef DOCKEDWINDOW_H
-#define DOCKEDWINDOW_H
+#pragma once
 
 #include <QMdiSubWindow>
 
@@ -41,5 +40,3 @@ private:
   bool m_dragMouseDown;
   QPoint m_dragStartPos;
 };
-
-#endif // DOCKEDWINDOW_H
diff --git a/MantidPlot/src/ErrDialog.h b/MantidPlot/src/ErrDialog.h
index a736a97e880..84287351570 100644
--- a/MantidPlot/src/ErrDialog.h
+++ b/MantidPlot/src/ErrDialog.h
@@ -27,8 +27,7 @@
  *   Boston, MA  02110-1301  USA                                           *
  *                                                                         *
  ***************************************************************************/
-#ifndef ERRDIALOG_H
-#define ERRDIALOG_H
+#pragma once
 
 #include <QDialog>
 #include <QList>
@@ -95,5 +94,3 @@ signals:
   void options(const QString &curveName, const QString &errColumnName,
                int direction);
 };
-
-#endif // ERRDIALOG_H
diff --git a/MantidPlot/src/ExpDecayDialog.h b/MantidPlot/src/ExpDecayDialog.h
index 5480eceb362..8c3b04102ae 100644
--- a/MantidPlot/src/ExpDecayDialog.h
+++ b/MantidPlot/src/ExpDecayDialog.h
@@ -27,8 +27,7 @@
  *   Boston, MA  02110-1301  USA                                           *
  *                                                                         *
  ***************************************************************************/
-#ifndef EXPDECAYDIALOG_H
-#define EXPDECAYDIALOG_H
+#pragma once
 
 #include <QDialog>
 
@@ -79,5 +78,3 @@ private:
   QLabel *thirdLabel, *dampingLabel;
   ColorBox *boxColor;
 };
-
-#endif
diff --git a/MantidPlot/src/ExponentialFit.h b/MantidPlot/src/ExponentialFit.h
index d889b723e50..c94d8ec4057 100644
--- a/MantidPlot/src/ExponentialFit.h
+++ b/MantidPlot/src/ExponentialFit.h
@@ -27,8 +27,7 @@
  *   Boston, MA  02110-1301  USA                                           *
  *                                                                         *
  ***************************************************************************/
-#ifndef EXPONENTIALFIT_H
-#define EXPONENTIALFIT_H
+#pragma once
 
 #include "Fit.h"
 
@@ -98,5 +97,4 @@ private:
   void init();
   void customizeFitResults() override;
   void calculateFitCurveData(double *X, double *Y) override;
-};
-#endif
+};
\ No newline at end of file
diff --git a/MantidPlot/src/ExportDialog.h b/MantidPlot/src/ExportDialog.h
index 3fbf325e05a..2d135b20e0d 100644
--- a/MantidPlot/src/ExportDialog.h
+++ b/MantidPlot/src/ExportDialog.h
@@ -27,8 +27,7 @@
  *   Boston, MA  02110-1301  USA                                           *
  *                                                                         *
  ***************************************************************************/
-#ifndef EXPORTDIALOG_H
-#define EXPORTDIALOG_H
+#pragma once
 
 #include <QDialog>
 class QPushButton;
@@ -86,5 +85,3 @@ protected slots:
   //! Display help
   void help();
 };
-
-#endif // ExportDialog_H
diff --git a/MantidPlot/src/FFT.h b/MantidPlot/src/FFT.h
index 17dd657cd41..85381f9306e 100644
--- a/MantidPlot/src/FFT.h
+++ b/MantidPlot/src/FFT.h
@@ -15,8 +15,7 @@
  *   Boston, MA  02110-1301  USA                                           *
  *                                                                         *
  ***************************************************************************/
-#ifndef FFT_H
-#define FFT_H
+#pragma once
 
 #include "Filter.h"
 
@@ -58,5 +57,3 @@ private:
 
   int d_real_col, d_imag_col;
 };
-
-#endif
diff --git a/MantidPlot/src/FFTDialog.h b/MantidPlot/src/FFTDialog.h
index 01fb3803731..9e92aaa6980 100644
--- a/MantidPlot/src/FFTDialog.h
+++ b/MantidPlot/src/FFTDialog.h
@@ -27,8 +27,7 @@
  *   Boston, MA  02110-1301  USA                                           *
  *                                                                         *
  ***************************************************************************/
-#ifndef FFTDIALOG_H
-#define FFTDIALOG_H
+#pragma once
 
 #include <QDialog>
 
@@ -72,5 +71,3 @@ private:
   QLineEdit *boxSampling;
   QCheckBox *boxNormalize, *boxOrder;
 };
-
-#endif
diff --git a/MantidPlot/src/FFTFilter.h b/MantidPlot/src/FFTFilter.h
index 907e35885d9..8d4cf07b76a 100644
--- a/MantidPlot/src/FFTFilter.h
+++ b/MantidPlot/src/FFTFilter.h
@@ -26,8 +26,7 @@
  *   Boston, MA  02110-1301  USA                                           *
  *                                                                         *
  ***************************************************************************/
-#ifndef FFTFILTER_H
-#define FFTFILTER_H
+#pragma once
 
 #include "Filter.h"
 
@@ -76,5 +75,3 @@ private:
   // Band Pass/Band block filter respectively.
   bool d_offset;
 };
-
-#endif
diff --git a/MantidPlot/src/Filter.h b/MantidPlot/src/Filter.h
index c49c1565f15..ab87f3d7c0e 100644
--- a/MantidPlot/src/Filter.h
+++ b/MantidPlot/src/Filter.h
@@ -26,8 +26,7 @@
  *   Boston, MA  02110-1301  USA                                           *
  *                                                                         *
  ***************************************************************************/
-#ifndef FILTER_H
-#define FILTER_H
+#pragma once
 
 #include <QObject>
 
@@ -200,5 +199,3 @@ protected:
 
   QString d_y_col_name;
 };
-
-#endif
diff --git a/MantidPlot/src/FilterDialog.h b/MantidPlot/src/FilterDialog.h
index e36b3d43996..da87c900489 100644
--- a/MantidPlot/src/FilterDialog.h
+++ b/MantidPlot/src/FilterDialog.h
@@ -27,8 +27,7 @@
  *   Boston, MA  02110-1301  USA                                           *
  *                                                                         *
  ***************************************************************************/
-#ifndef FILTERDIALOG_H
-#define FILTERDIALOG_H
+#pragma once
 
 #include <QDialog>
 
@@ -62,5 +61,3 @@ private:
   QLineEdit *boxEnd;
   ColorBox *boxColor;
 };
-
-#endif
diff --git a/MantidPlot/src/FindDialog.h b/MantidPlot/src/FindDialog.h
index f1774c5b4d2..53a86644a51 100644
--- a/MantidPlot/src/FindDialog.h
+++ b/MantidPlot/src/FindDialog.h
@@ -27,8 +27,7 @@
  *   Boston, MA  02110-1301  USA                                           *
  *                                                                         *
  ***************************************************************************/
-#ifndef FINDDIALOG_H
-#define FINDDIALOG_H
+#pragma once
 
 #include <QDialog>
 #include <QLabel>
@@ -71,5 +70,3 @@ protected slots:
 
   void accept() override;
 };
-
-#endif // exportDialog_H
diff --git a/MantidPlot/src/Fit.h b/MantidPlot/src/Fit.h
index 5bd8fe7fa0f..5facf7821c3 100644
--- a/MantidPlot/src/Fit.h
+++ b/MantidPlot/src/Fit.h
@@ -15,8 +15,7 @@
  *   Boston, MA  02110-1301  USA                                           *
  *                                                                         *
  ***************************************************************************/
-#ifndef FIT_H
-#define FIT_H
+#pragma once
 
 #include <QObject>
 
@@ -248,5 +247,3 @@ protected:
   //! Stores the right limits of the research interval for the result parameters
   double *d_param_range_right;
 };
-
-#endif
diff --git a/MantidPlot/src/FitDialog.h b/MantidPlot/src/FitDialog.h
index a8fc4fcc1bc..5d1c957c06b 100644
--- a/MantidPlot/src/FitDialog.h
+++ b/MantidPlot/src/FitDialog.h
@@ -15,8 +15,7 @@
  *   Boston, MA  02110-1301  USA                                           *
  *                                                                         *
  ***************************************************************************/
-#ifndef FITDIALOG_H
-#define FITDIALOG_H
+#pragma once
 
 #include "Graph.h"
 #include <QCheckBox>
@@ -145,5 +144,4 @@ private:
   QLineEdit *covMatrixName, *paramTableName;
   QCheckBox *plotLabelBox, *logBox, *scaleErrorsBox, *globalParamTableBox;
   QCheckBox *previewBox;
-};
-#endif // FITDIALOG_H
+};
\ No newline at end of file
diff --git a/MantidPlot/src/FitModelHandler.h b/MantidPlot/src/FitModelHandler.h
index 65c5f416c39..56f38128f38 100644
--- a/MantidPlot/src/FitModelHandler.h
+++ b/MantidPlot/src/FitModelHandler.h
@@ -15,8 +15,7 @@
  *   Boston, MA  02110-1301  USA                                           *
  *                                                                         *
  ***************************************************************************/
-#ifndef FITMODELHANDLER_H
-#define FITMODELHANDLER_H
+#pragma once
 
 #include <QVarLengthArray>
 #include <QXmlDefaultHandler>
@@ -46,5 +45,3 @@ private:
   QStringList d_explanations;
   QVarLengthArray<double> d_values;
 };
-
-#endif
diff --git a/MantidPlot/src/FloatingWindow.h b/MantidPlot/src/FloatingWindow.h
index 5c263bcb931..8ee73b04fce 100644
--- a/MantidPlot/src/FloatingWindow.h
+++ b/MantidPlot/src/FloatingWindow.h
@@ -4,8 +4,7 @@
 //     NScD Oak Ridge National Laboratory, European Spallation Source
 //     & Institut Laue - Langevin
 // SPDX - License - Identifier: GPL - 3.0 +
-#ifndef FloatingWindow_H
-#define FloatingWindow_H
+#pragma once
 
 #include <QMainWindow>
 
@@ -52,5 +51,3 @@ private:
   bool m_dragMouseDown;
   QPoint m_dragStartPos;
 };
-
-#endif
diff --git a/MantidPlot/src/Folder.h b/MantidPlot/src/Folder.h
index 351e8af3105..c8dca1bddfe 100644
--- a/MantidPlot/src/Folder.h
+++ b/MantidPlot/src/Folder.h
@@ -27,8 +27,7 @@
  *   Boston, MA  02110-1301  USA                                           *
  *                                                                         *
  ***************************************************************************/
-#ifndef FOLDER_H
-#define FOLDER_H
+#pragma once
 
 #include <QEvent>
 #include <QObject>
@@ -220,5 +219,3 @@ protected slots:
 signals:
   void deleteSelection();
 };
-
-#endif
diff --git a/MantidPlot/src/FunctionCurve.h b/MantidPlot/src/FunctionCurve.h
index 41fd1ce3889..6e4bb863f8f 100644
--- a/MantidPlot/src/FunctionCurve.h
+++ b/MantidPlot/src/FunctionCurve.h
@@ -27,8 +27,7 @@
  *   Boston, MA  02110-1301  USA                                           *
  *                                                                         *
  ***************************************************************************/
-#ifndef FUNCTIONCURVE_H
-#define FUNCTIONCURVE_H
+#pragma once
 
 #include "PlotCurve.h"
 
@@ -108,5 +107,3 @@ private:
   /// Equal null where the curve is not plotting an IFunction
   const Mantid::API::IFunction *m_identifier;
 };
-
-#endif
diff --git a/MantidPlot/src/FunctionDialog.h b/MantidPlot/src/FunctionDialog.h
index ffdfdf594fa..69389b2ff24 100644
--- a/MantidPlot/src/FunctionDialog.h
+++ b/MantidPlot/src/FunctionDialog.h
@@ -27,8 +27,7 @@
  *   Boston, MA  02110-1301  USA                                           *
  *                                                                         *
  ***************************************************************************/
-#ifndef FUNCTIONDIALOG_H
-#define FUNCTIONDIALOG_H
+#pragma once
 
 #include "Graph.h"
 
@@ -100,5 +99,3 @@ private:
   Graph *graph;
   int curveID;
 };
-
-#endif // FUNCTIONDIALOG_H
diff --git a/MantidPlot/src/Graph.h b/MantidPlot/src/Graph.h
index 160293e199c..30d7f397b38 100644
--- a/MantidPlot/src/Graph.h
+++ b/MantidPlot/src/Graph.h
@@ -26,8 +26,7 @@
  *   Boston, MA  02110-1301  USA                                           *
  *                                                                         *
  ***************************************************************************/
-#ifndef GRAPH_H
-#define GRAPH_H
+#pragma once
 
 #include <QEvent>
 #include <QList>
@@ -988,5 +987,3 @@ private:
 };
 
 Q_DECLARE_METATYPE(GraphOptions::CurveType)
-
-#endif // GRAPH_H
diff --git a/MantidPlot/src/Graph3D.h b/MantidPlot/src/Graph3D.h
index 2d8b317dceb..cc9551d6bd5 100644
--- a/MantidPlot/src/Graph3D.h
+++ b/MantidPlot/src/Graph3D.h
@@ -15,8 +15,7 @@
  *   Boston, MA  02110-1301  USA                                           *
  *                                                                         *
  ***************************************************************************/
-#ifndef GRAPH3D_H
-#define GRAPH3D_H
+#pragma once
 
 #include "MantidGeometry/Rendering/OpenGL_Headers.h"
 #include "MantidQtWidgets/Common/IProjectSerialisable.h"
@@ -496,5 +495,3 @@ private:
   bool d_u_periodic, d_v_periodic;
   double d_ul, d_ur, d_vl, d_vr;
 };
-
-#endif // Plot3D_H
diff --git a/MantidPlot/src/Grid.h b/MantidPlot/src/Grid.h
index fce498ef3bc..bd13b2f2b7a 100644
--- a/MantidPlot/src/Grid.h
+++ b/MantidPlot/src/Grid.h
@@ -15,8 +15,7 @@
  *   Boston, MA  02110-1301  USA                                           *
  *                                                                         *
  ***************************************************************************/
-#ifndef GRID_H
-#define GRID_H
+#pragma once
 
 #include <qwt_plot.h>
 #include <qwt_plot_grid.h>
@@ -68,5 +67,3 @@ private:
 
   int mrkX, mrkY; // x=0 et y=0 line markers keys
 };
-
-#endif
diff --git a/MantidPlot/src/GridDetails.h b/MantidPlot/src/GridDetails.h
index a2c0290278e..75911a57b70 100644
--- a/MantidPlot/src/GridDetails.h
+++ b/MantidPlot/src/GridDetails.h
@@ -13,8 +13,7 @@ from the University of Derby
 @date 24/09/2013
 */
 
-#ifndef GRIDDETAILS_H_
-#define GRIDDETAILS_H_
+#pragma once
 
 #include "MantidQtWidgets/Common/DoubleSpinBox.h"
 #include <QList>
@@ -55,5 +54,4 @@ private:
   Graph *m_graph;
   int m_alignment; // 0 = horizontal, 1 = vertical, anything else sets this to
                    // 0;
-};
-#endif /* GRIDDETAILS_H_ */
\ No newline at end of file
+};
\ No newline at end of file
diff --git a/MantidPlot/src/ImageDialog.h b/MantidPlot/src/ImageDialog.h
index 0ab7ef59c4a..a5936852a96 100644
--- a/MantidPlot/src/ImageDialog.h
+++ b/MantidPlot/src/ImageDialog.h
@@ -27,8 +27,7 @@
  *   Boston, MA  02110-1301  USA                                           *
  *                                                                         *
  ***************************************************************************/
-#ifndef IMAGEDIALOG_H
-#define IMAGEDIALOG_H
+#pragma once
 
 #include <QCheckBox>
 #include <QDialog>
@@ -64,5 +63,3 @@ private:
   QSpinBox *boxX, *boxY, *boxWidth, *boxHeight;
   QCheckBox *keepRatioBox;
 };
-
-#endif // IMAGEDIALOG_H
diff --git a/MantidPlot/src/ImageExportDialog.h b/MantidPlot/src/ImageExportDialog.h
index 146bd58cd7a..20a4f0118ec 100644
--- a/MantidPlot/src/ImageExportDialog.h
+++ b/MantidPlot/src/ImageExportDialog.h
@@ -28,8 +28,7 @@
  *   Boston, MA  02110-1301  USA                                           *
  *                                                                         *
  ***************************************************************************/
-#ifndef IMAGEEXPORTDIALOG_H
-#define IMAGEEXPORTDIALOG_H
+#pragma once
 
 #include "ExtensibleFileDialog.h"
 
@@ -104,5 +103,3 @@ protected slots:
   //! Update which options are visible and enabled based on the output format.
   void updateAdvancedOptions(const QString &filter);
 };
-
-#endif
diff --git a/MantidPlot/src/ImageMarker.h b/MantidPlot/src/ImageMarker.h
index 3f314594efd..394d71b6fe4 100644
--- a/MantidPlot/src/ImageMarker.h
+++ b/MantidPlot/src/ImageMarker.h
@@ -26,8 +26,7 @@
  *   Boston, MA  02110-1301  USA                                           *
  *                                                                         *
  ***************************************************************************/
-#ifndef IMAGEMARKER_H
-#define IMAGEMARKER_H
+#pragma once
 
 #include <QPixmap>
 #include <qwt_plot.h>
@@ -127,5 +126,3 @@ private:
   double d_x_right;    //!< The right side position in scale coordinates.
   double d_y_bottom;   //!< The bottom side position in scale coordinates.
 };
-
-#endif
diff --git a/MantidPlot/src/ImportASCIIDialog.h b/MantidPlot/src/ImportASCIIDialog.h
index f961dda863a..cb767e331b6 100644
--- a/MantidPlot/src/ImportASCIIDialog.h
+++ b/MantidPlot/src/ImportASCIIDialog.h
@@ -26,8 +26,7 @@
  *   Boston, MA  02110-1301  USA                                           *
  *                                                                         *
  ***************************************************************************/
-#ifndef IMPORTFILESDIALOG_H
-#define IMPORTFILESDIALOG_H
+#pragma once
 
 #include "ExtensibleFileDialog.h"
 
@@ -204,5 +203,3 @@ private:
   QStackedWidget *d_preview_stack;
   QString d_current_path;
 };
-
-#endif
diff --git a/MantidPlot/src/IntDialog.h b/MantidPlot/src/IntDialog.h
index 6dd9f926311..9036ec6136a 100644
--- a/MantidPlot/src/IntDialog.h
+++ b/MantidPlot/src/IntDialog.h
@@ -26,8 +26,7 @@
  *   Boston, MA  02110-1301  USA                                           *
  *                                                                         *
  ***************************************************************************/
-#ifndef INTDIALOG_H
-#define INTDIALOG_H
+#pragma once
 
 #include <QDialog>
 
@@ -64,5 +63,3 @@ private:
   DoubleSpinBox *boxEnd;
   DoubleSpinBox *boxTol;
 };
-
-#endif
diff --git a/MantidPlot/src/Integration.h b/MantidPlot/src/Integration.h
index 3ba6142383e..a4660c3e87f 100644
--- a/MantidPlot/src/Integration.h
+++ b/MantidPlot/src/Integration.h
@@ -26,8 +26,7 @@
  *   Boston, MA  02110-1301  USA                                           *
  *                                                                         *
  ***************************************************************************/
-#ifndef INTEGRATION_H
-#define INTEGRATION_H
+#pragma once
 
 #include "Filter.h"
 
@@ -76,5 +75,3 @@ private:
   //! Variable name for the function to be integrated
   QString d_variable;
 };
-
-#endif
diff --git a/MantidPlot/src/Interpolation.h b/MantidPlot/src/Interpolation.h
index 518113c80dd..e26d727a617 100644
--- a/MantidPlot/src/Interpolation.h
+++ b/MantidPlot/src/Interpolation.h
@@ -26,8 +26,7 @@
  *   Boston, MA  02110-1301  USA                                           *
  *                                                                         *
  ***************************************************************************/
-#ifndef INTERPOLATION_H
-#define INTERPOLATION_H
+#pragma once
 
 #include "Filter.h"
 
@@ -57,5 +56,3 @@ private:
   //! the interpolation method
   int d_method;
 };
-
-#endif
diff --git a/MantidPlot/src/InterpolationDialog.h b/MantidPlot/src/InterpolationDialog.h
index fbb4a3c213a..9008dddd68f 100644
--- a/MantidPlot/src/InterpolationDialog.h
+++ b/MantidPlot/src/InterpolationDialog.h
@@ -27,8 +27,7 @@
  *   Boston, MA  02110-1301  USA                                           *
  *                                                                         *
  ***************************************************************************/
-#ifndef INTERPOLATIONDIALOG_H
-#define INTERPOLATIONDIALOG_H
+#pragma once
 
 #include <QDialog>
 
@@ -63,5 +62,3 @@ private:
   QLineEdit *boxEnd;
   ColorBox *boxColor;
 };
-
-#endif
diff --git a/MantidPlot/src/LabelTool.h b/MantidPlot/src/LabelTool.h
index 2fdc2fb1068..e9a636e6168 100644
--- a/MantidPlot/src/LabelTool.h
+++ b/MantidPlot/src/LabelTool.h
@@ -4,8 +4,7 @@
 //     NScD Oak Ridge National Laboratory, European Spallation Source
 //     & Institut Laue - Langevin
 // SPDX - License - Identifier: GPL - 3.0 +
-#ifndef LABEL_TOOL_H
-#define LABEL_TOOL_H
+#pragma once
 
 #include "PlotToolInterface.h"
 #include <QObject>
@@ -82,5 +81,3 @@ private slots:
   void insertErrorValue();
   void showLogValuesDialog();
 };
-
-#endif // ifndef LABEL_TOOL_H
diff --git a/MantidPlot/src/LayerDialog.h b/MantidPlot/src/LayerDialog.h
index 953d0399920..eb92769560f 100644
--- a/MantidPlot/src/LayerDialog.h
+++ b/MantidPlot/src/LayerDialog.h
@@ -15,8 +15,7 @@
  *   Boston, MA  02110-1301  USA                                           *
  *                                                                         *
  ***************************************************************************/
-#ifndef LAYERDIALOG_H
-#define LAYERDIALOG_H
+#pragma once
 
 #include "MultiLayer.h"
 
@@ -55,5 +54,3 @@ private:
   QCheckBox *fitBox;
   QComboBox *alignHorBox, *alignVertBox;
 };
-
-#endif
diff --git a/MantidPlot/src/LegendWidget.h b/MantidPlot/src/LegendWidget.h
index 883538da1e4..827f2e35fb8 100644
--- a/MantidPlot/src/LegendWidget.h
+++ b/MantidPlot/src/LegendWidget.h
@@ -15,8 +15,7 @@
  *   Boston, MA  02110-1301  USA                                           *
  *                                                                         *
  ***************************************************************************/
-#ifndef LEGENDWIDGET_H
-#define LEGENDWIDGET_H
+#pragma once
 
 #include <QWidget>
 #include <qwt_plot.h>
@@ -120,5 +119,3 @@ signals:
   void showMenu();
   void enableEditor();
 };
-
-#endif
diff --git a/MantidPlot/src/LineDialog.h b/MantidPlot/src/LineDialog.h
index feae2b6ad3a..7dde6b3a1f5 100644
--- a/MantidPlot/src/LineDialog.h
+++ b/MantidPlot/src/LineDialog.h
@@ -15,8 +15,7 @@
  *   Boston, MA  02110-1301  USA                                           *
  *                                                                         *
  ***************************************************************************/
-#ifndef LINEDIALOG_H
-#define LINEDIALOG_H
+#pragma once
 
 #include <qdialog.h>
 
@@ -71,5 +70,3 @@ private:
   QSpinBox *xStartPixelBox, *yStartPixelBox, *xEndPixelBox, *yEndPixelBox;
   QSpinBox *boxHeadAngle, *boxHeadLength;
 };
-
-#endif // LINEDIALOG_H
diff --git a/MantidPlot/src/LineProfileTool.h b/MantidPlot/src/LineProfileTool.h
index 2f821a206cd..97a1f7f1376 100644
--- a/MantidPlot/src/LineProfileTool.h
+++ b/MantidPlot/src/LineProfileTool.h
@@ -27,8 +27,7 @@
  *   Boston, MA  02110-1301  USA                                           *
  *                                                                         *
  ***************************************************************************/
-#ifndef LINE_PROFILE_TOOL_H
-#define LINE_PROFILE_TOOL_H
+#pragma once
 
 #include "PlotToolInterface.h"
 
@@ -121,5 +120,3 @@ private:
   //! Difference between current and start position during operation.
   QPoint d_op_dp;
 };
-
-#endif // ifndef LINE_PROFILE_TOOL_H
diff --git a/MantidPlot/src/LogisticFit.h b/MantidPlot/src/LogisticFit.h
index 8cb256b0d51..163ff3909f7 100644
--- a/MantidPlot/src/LogisticFit.h
+++ b/MantidPlot/src/LogisticFit.h
@@ -15,8 +15,7 @@
  *   Boston, MA  02110-1301  USA                                           *
  *                                                                         *
  ***************************************************************************/
-#ifndef LOGISTICFIT_H
-#define LOGISTICFIT_H
+#pragma once
 
 #include "Fit.h"
 
@@ -40,5 +39,3 @@ private:
   void init();
   void calculateFitCurveData(double *X, double *Y) override;
 };
-
-#endif
diff --git a/MantidPlot/src/Mantid/AlgorithmDockWidget.h b/MantidPlot/src/Mantid/AlgorithmDockWidget.h
index 1f9d51bf942..15ae52a164c 100644
--- a/MantidPlot/src/Mantid/AlgorithmDockWidget.h
+++ b/MantidPlot/src/Mantid/AlgorithmDockWidget.h
@@ -4,8 +4,7 @@
 //     NScD Oak Ridge National Laboratory, European Spallation Source
 //     & Institut Laue - Langevin
 // SPDX - License - Identifier: GPL - 3.0 +
-#ifndef ALGORITHMDOCKWIDGET_H
-#define ALGORITHMDOCKWIDGET_H
+#pragma once
 
 #include "MantidQtWidgets/Common/AlgorithmSelectorWidget.h"
 #include <QDockWidget>
@@ -41,5 +40,4 @@ protected:
 
 private:
   MantidUI *m_mantidUI;
-};
-#endif // ALGORITHMDOCKWIDGET_H
\ No newline at end of file
+};
\ No newline at end of file
diff --git a/MantidPlot/src/Mantid/AlgorithmMonitor.h b/MantidPlot/src/Mantid/AlgorithmMonitor.h
index 04e6d809417..ba05b59b34d 100644
--- a/MantidPlot/src/Mantid/AlgorithmMonitor.h
+++ b/MantidPlot/src/Mantid/AlgorithmMonitor.h
@@ -4,8 +4,7 @@
 //     NScD Oak Ridge National Laboratory, European Spallation Source
 //     & Institut Laue - Langevin
 // SPDX - License - Identifier: GPL - 3.0 +
-#ifndef ALGMONITOR_H
-#define ALGMONITOR_H
+#pragma once
 
 #include "MantidAPI/Algorithm.h"
 #include "MantidAPI/AlgorithmManager.h"
@@ -129,5 +128,3 @@ signals:
 private:
   Mantid::API::AlgorithmID m_alg;
 };
-
-#endif /* ALGMONITOR_H */
diff --git a/MantidPlot/src/Mantid/ErrorBarSettings.h b/MantidPlot/src/Mantid/ErrorBarSettings.h
index 0026e65b50e..8d0ce7d6bd3 100644
--- a/MantidPlot/src/Mantid/ErrorBarSettings.h
+++ b/MantidPlot/src/Mantid/ErrorBarSettings.h
@@ -4,8 +4,7 @@
 //     NScD Oak Ridge National Laboratory, European Spallation Source
 //     & Institut Laue - Langevin
 // SPDX - License - Identifier: GPL - 3.0 +
-#ifndef ERRORBARSETTINGS_H
-#define ERRORBARSETTINGS_H
+#pragma once
 
 #include <QColor>
 #include <QObject>
@@ -56,5 +55,3 @@ private:
   friend class MantidMatrixCurve;
   friend class MantidMDCurve;
 };
-
-#endif
diff --git a/MantidPlot/src/Mantid/FirstTimeSetup.h b/MantidPlot/src/Mantid/FirstTimeSetup.h
index 612549cefa6..c6b8e8cbf58 100644
--- a/MantidPlot/src/Mantid/FirstTimeSetup.h
+++ b/MantidPlot/src/Mantid/FirstTimeSetup.h
@@ -4,8 +4,7 @@
 //     NScD Oak Ridge National Laboratory, European Spallation Source
 //     & Institut Laue - Langevin
 // SPDX - License - Identifier: GPL - 3.0 +
-#ifndef MANTIDPLOT_FIRST_RUN_SETUP_WINDOW
-#define MANTIDPLOT_FIRST_RUN_SETUP_WINDOW
+#pragma once
 
 #include "ui_FirstTimeSetup.h"
 #include <QDialog>
@@ -46,5 +45,3 @@ private slots:
 private:
   Ui::FirstTimeSetup m_uiForm;
 };
-
-#endif
\ No newline at end of file
diff --git a/MantidPlot/src/Mantid/FitParameterTie.h b/MantidPlot/src/Mantid/FitParameterTie.h
index 9d21e540d6e..9cd4808b962 100644
--- a/MantidPlot/src/Mantid/FitParameterTie.h
+++ b/MantidPlot/src/Mantid/FitParameterTie.h
@@ -4,8 +4,7 @@
 //     NScD Oak Ridge National Laboratory, European Spallation Source
 //     & Institut Laue - Langevin
 // SPDX - License - Identifier: GPL - 3.0 +
-#ifndef FITPARAMETERTIE_H
-#define FITPARAMETERTIE_H
+#pragma once
 
 #include <QList>
 #include <QString>
@@ -59,5 +58,3 @@ private:
   /// The property
   QtProperty *m_prop;
 };
-
-#endif /* FITPARAMETERTIE_H */
diff --git a/MantidPlot/src/Mantid/IFunctionWrapper.h b/MantidPlot/src/Mantid/IFunctionWrapper.h
index 1f24d4076b0..58910fa4609 100644
--- a/MantidPlot/src/Mantid/IFunctionWrapper.h
+++ b/MantidPlot/src/Mantid/IFunctionWrapper.h
@@ -4,8 +4,7 @@
 //     NScD Oak Ridge National Laboratory, European Spallation Source
 //     & Institut Laue - Langevin
 // SPDX - License - Identifier: GPL - 3.0 +
-#ifndef IFUNCTIONWRAPPER_H
-#define IFUNCTIONWRAPPER_H
+#pragma once
 
 #include <QObject>
 #include <boost/shared_ptr.hpp>
@@ -47,5 +46,3 @@ private:
   boost::shared_ptr<Mantid::API::CompositeFunction> m_compositeFunction;
   boost::shared_ptr<Mantid::API::IPeakFunction> m_peakFunction;
 };
-
-#endif /* IFUNCTIONWRAPPER_H */
diff --git a/MantidPlot/src/Mantid/IMantidMatrixExtensionHandler.h b/MantidPlot/src/Mantid/IMantidMatrixExtensionHandler.h
index 06336a197fa..fdcaca20399 100644
--- a/MantidPlot/src/Mantid/IMantidMatrixExtensionHandler.h
+++ b/MantidPlot/src/Mantid/IMantidMatrixExtensionHandler.h
@@ -4,8 +4,7 @@
 //     NScD Oak Ridge National Laboratory, European Spallation Source
 //     & Institut Laue - Langevin
 // SPDX - License - Identifier: GPL - 3.0 +
-#ifndef MANTIDPLOT_IMANTIDMATRIXEXTENSIONHANDLER_H
-#define MANTIDPLOT_IMANTIDMATRIXEXTENSIONHANDLER_H
+#pragma once
 
 #include "MantidKernel/Chainable.h"
 #include "MantidMatrixTabExtension.h"
@@ -28,5 +27,4 @@ public:
   virtual void setColumnWidthPreference(MantidMatrixTabExtension &extension,
                                         int width) = 0;
   virtual int getColumnWidthPreference(MantidMatrixTabExtension &extension) = 0;
-};
-#endif
+};
\ No newline at end of file
diff --git a/MantidPlot/src/Mantid/ImportWorkspaceDlg.h b/MantidPlot/src/Mantid/ImportWorkspaceDlg.h
index 7679084bc04..5df8011788a 100644
--- a/MantidPlot/src/Mantid/ImportWorkspaceDlg.h
+++ b/MantidPlot/src/Mantid/ImportWorkspaceDlg.h
@@ -5,8 +5,7 @@
 //     & Institut Laue - Langevin
 // SPDX - License - Identifier: GPL - 3.0 +
 
-#ifndef IMPORTWORKSPACEDLG_H
-#define IMPORTWORKSPACEDLG_H
+#pragma once
 
 #include <QDialog>
 
@@ -57,5 +56,3 @@ private:
   QPushButton *okButton;
   QPushButton *cancelButton;
 };
-
-#endif /* IMPORTWORKSPACEDLG_H */
diff --git a/MantidPlot/src/Mantid/InputHistory.h b/MantidPlot/src/Mantid/InputHistory.h
index 65bf7a571b7..5888b39d3df 100644
--- a/MantidPlot/src/Mantid/InputHistory.h
+++ b/MantidPlot/src/Mantid/InputHistory.h
@@ -4,8 +4,7 @@
 //     NScD Oak Ridge National Laboratory, European Spallation Source
 //     & Institut Laue - Langevin
 // SPDX - License - Identifier: GPL - 3.0 +
-#ifndef INPUTHISTORY_H
-#define INPUTHISTORY_H
+#pragma once
 
 #include "MantidKernel/SingletonHolder.h"
 #include <boost/shared_ptr.hpp>
@@ -74,5 +73,3 @@ private:
 };
 
 using InputHistory = Mantid::Kernel::SingletonHolder<InputHistoryImpl>;
-
-#endif /* INPUTHISTORY_H */
diff --git a/MantidPlot/src/Mantid/InstrumentWidget/InstrumentWindow.h b/MantidPlot/src/Mantid/InstrumentWidget/InstrumentWindow.h
index ece431eac51..f7d95607650 100644
--- a/MantidPlot/src/Mantid/InstrumentWidget/InstrumentWindow.h
+++ b/MantidPlot/src/Mantid/InstrumentWidget/InstrumentWindow.h
@@ -4,8 +4,7 @@
 //     NScD Oak Ridge National Laboratory, European Spallation Source
 //     & Institut Laue - Langevin
 // SPDX - License - Identifier: GPL - 3.0 +
-#ifndef INSTRUMENTWINDOW_H
-#define INSTRUMENTWINDOW_H
+#pragma once
 
 #include "MantidAPI/AlgorithmObserver.h"
 #include "MantidAPI/AnalysisDataService.h"
@@ -68,5 +67,3 @@ public slots:
 private:
   MantidQt::MantidWidgets::InstrumentWidget *m_instrumentWidget;
 };
-
-#endif // INSTRUMENTWINDOW_H
diff --git a/MantidPlot/src/Mantid/LabelToolLogValuesDialog.h b/MantidPlot/src/Mantid/LabelToolLogValuesDialog.h
index 04af30b98e2..7fd33f1cbe0 100644
--- a/MantidPlot/src/Mantid/LabelToolLogValuesDialog.h
+++ b/MantidPlot/src/Mantid/LabelToolLogValuesDialog.h
@@ -4,8 +4,7 @@
 //     NScD Oak Ridge National Laboratory, European Spallation Source
 //     & Institut Laue - Langevin
 // SPDX - License - Identifier: GPL - 3.0 +
-#ifndef LABELTOOLLOGVALUESDIALOG_H_
-#define LABELTOOLLOGVALUESDIALOG_H_
+#pragma once
 
 //----------------------------------
 // Includes
@@ -53,5 +52,3 @@ private:
   /// Tracks which statistic of the log is selected
   QRadioButton *statRadioChoice[NUM_STATS];
 };
-
-#endif // LABELTOOLLOGVALUESDIALOG_H_
\ No newline at end of file
diff --git a/MantidPlot/src/Mantid/ManageCustomMenus.h b/MantidPlot/src/Mantid/ManageCustomMenus.h
index cbc1e750f74..1e3905d8970 100644
--- a/MantidPlot/src/Mantid/ManageCustomMenus.h
+++ b/MantidPlot/src/Mantid/ManageCustomMenus.h
@@ -4,8 +4,7 @@
 //     NScD Oak Ridge National Laboratory, European Spallation Source
 //     & Institut Laue - Langevin
 // SPDX - License - Identifier: GPL - 3.0 +
-#ifndef MANTID_MANAGE_CUSTOM_MENUS_H
-#define MANTID_MANAGE_CUSTOM_MENUS_H
+#pragma once
 
 #include "MantidQtWidgets/Common/MantidDialog.h"
 #include "ui_ManageCustomMenus.h"
@@ -46,5 +45,3 @@ private:
   QTreeWidget *m_menusTree;
   ApplicationWindow *m_appWindow;
 };
-
-#endif /* MANTID_MANAGE_CUSTOM_MENUS_H */
\ No newline at end of file
diff --git a/MantidPlot/src/Mantid/ManageInterfaceCategories.h b/MantidPlot/src/Mantid/ManageInterfaceCategories.h
index ba63736d1ad..eda1c1e9285 100644
--- a/MantidPlot/src/Mantid/ManageInterfaceCategories.h
+++ b/MantidPlot/src/Mantid/ManageInterfaceCategories.h
@@ -4,8 +4,7 @@
 //     NScD Oak Ridge National Laboratory, European Spallation Source
 //     & Institut Laue - Langevin
 // SPDX - License - Identifier: GPL - 3.0 +
-#ifndef MANTID_MANAGE_INTERFACE_CATEGORIES_H
-#define MANTID_MANAGE_INTERFACE_CATEGORIES_H
+#pragma once
 
 #include <QAbstractListModel>
 #include <QDialog>
@@ -93,5 +92,3 @@ private:
   /// The model used by the View of this dialog.
   InterfaceCategoryModel m_model;
 };
-
-#endif /* MANTID_MANAGE_INTERFACE_CATEGORIES_H */
diff --git a/MantidPlot/src/Mantid/MantidAbout.h b/MantidPlot/src/Mantid/MantidAbout.h
index 4a9468c6d25..a3f59165bad 100644
--- a/MantidPlot/src/Mantid/MantidAbout.h
+++ b/MantidPlot/src/Mantid/MantidAbout.h
@@ -4,8 +4,7 @@
 //     NScD Oak Ridge National Laboratory, European Spallation Source
 //     & Institut Laue - Langevin
 // SPDX - License - Identifier: GPL - 3.0 +
-#ifndef MANTIDABOUT_H
-#define MANTIDABOUT_H
+#pragma once
 
 //----------------------
 // Includes
@@ -37,5 +36,3 @@ private:
   /// form generated by QT Designer
   Ui::MantidAbout m_uiForm;
 };
-
-#endif /* MANTIDABOUT_H */
diff --git a/MantidPlot/src/Mantid/MantidApplication.h b/MantidPlot/src/Mantid/MantidApplication.h
index 23823dfc662..395a567c8b8 100644
--- a/MantidPlot/src/Mantid/MantidApplication.h
+++ b/MantidPlot/src/Mantid/MantidApplication.h
@@ -4,8 +4,7 @@
 //     NScD Oak Ridge National Laboratory, European Spallation Source
 //     & Institut Laue - Langevin
 // SPDX - License - Identifier: GPL - 3.0 +
-#ifndef MANTIDAPPLICATION_H_
-#define MANTIDAPPLICATION_H_
+#pragma once
 
 //============================================================
 // Inheriting class to make sure we catch any top level errors
@@ -24,5 +23,3 @@ public slots:
   void errorHandling(bool continueWork, int sharing, QString name,
                      QString email, QString textbox);
 };
-
-#endif // MANTIDAPPLICATION_H_
diff --git a/MantidPlot/src/Mantid/MantidCurve.h b/MantidPlot/src/Mantid/MantidCurve.h
index d3324a20aa9..72d0fab7b7c 100644
--- a/MantidPlot/src/Mantid/MantidCurve.h
+++ b/MantidPlot/src/Mantid/MantidCurve.h
@@ -4,8 +4,7 @@
 //     NScD Oak Ridge National Laboratory, European Spallation Source
 //     & Institut Laue - Langevin
 // SPDX - License - Identifier: GPL - 3.0 +
-#ifndef MANTIDPLOT_MANTIDCURVE_H
-#define MANTIDPLOT_MANTIDCURVE_H
+#pragma once
 
 #include "../PlotCurve.h"
 #include "MantidAPI/Workspace_fwd.h"
@@ -94,5 +93,3 @@ private:
   virtual void init(Graph *g, bool distr, GraphOptions::CurveType style,
                     bool multileSpectra = false) = 0;
 };
-
-#endif
diff --git a/MantidPlot/src/Mantid/MantidMDCurve.h b/MantidPlot/src/Mantid/MantidMDCurve.h
index d3d1cbcd399..5cbf9ab54f5 100644
--- a/MantidPlot/src/Mantid/MantidMDCurve.h
+++ b/MantidPlot/src/Mantid/MantidMDCurve.h
@@ -4,8 +4,7 @@
 //     NScD Oak Ridge National Laboratory, European Spallation Source
 //     & Institut Laue - Langevin
 // SPDX - License - Identifier: GPL - 3.0 +
-#ifndef MANTID_MD_CURVE_H
-#define MANTID_MD_CURVE_H
+#pragma once
 
 #include "MantidAPI/IMDWorkspace.h"
 #include "MantidCurve.h"
@@ -107,5 +106,3 @@ private:
   QString
       m_wsName; ///< Workspace name. If empty the ws isn't in the data service
 };
-
-#endif // MANTID_CURVE_H
diff --git a/MantidPlot/src/Mantid/MantidMDCurveDialog.h b/MantidPlot/src/Mantid/MantidMDCurveDialog.h
index 0f463cc681b..293bb7c06f1 100644
--- a/MantidPlot/src/Mantid/MantidMDCurveDialog.h
+++ b/MantidPlot/src/Mantid/MantidMDCurveDialog.h
@@ -4,8 +4,7 @@
 //     NScD Oak Ridge National Laboratory, European Spallation Source
 //     & Institut Laue - Langevin
 // SPDX - License - Identifier: GPL - 3.0 +
-#ifndef MANTIDMDCURVEDIALOG_H
-#define MANTIDMDCURVEDIALOG_H
+#pragma once
 
 #include "MantidQtWidgets/SliceViewer/LinePlotOptions.h"
 #include "ui_MantidMDCurveDialog.h"
@@ -38,5 +37,3 @@ private:
   /// Widget with MD plot options
   LinePlotOptions *m_lineOptions;
 };
-
-#endif // MANTIDMDCURVEDIALOG_H
diff --git a/MantidPlot/src/Mantid/MantidMatrix.h b/MantidPlot/src/Mantid/MantidMatrix.h
index c0eea03b48d..49baba1ba5b 100644
--- a/MantidPlot/src/Mantid/MantidMatrix.h
+++ b/MantidPlot/src/Mantid/MantidMatrix.h
@@ -4,8 +4,7 @@
 //     NScD Oak Ridge National Laboratory, European Spallation Source
 //     & Institut Laue - Langevin
 // SPDX - License - Identifier: GPL - 3.0 +
-#ifndef MANTIDMATRIX_H
-#define MANTIDMATRIX_H
+#pragma once
 
 #include <map>
 #include <math.h>
@@ -368,5 +367,3 @@ private:
   bool m_colormapPen;
   ContourLinesEditor *m_ContourLinesEditor;
 };
-
-#endif
diff --git a/MantidPlot/src/Mantid/MantidMatrixCurve.h b/MantidPlot/src/Mantid/MantidMatrixCurve.h
index 0a5038c21ed..8fe65045a4e 100644
--- a/MantidPlot/src/Mantid/MantidMatrixCurve.h
+++ b/MantidPlot/src/Mantid/MantidMatrixCurve.h
@@ -4,8 +4,7 @@
 //     NScD Oak Ridge National Laboratory, European Spallation Source
 //     & Institut Laue - Langevin
 // SPDX - License - Identifier: GPL - 3.0 +
-#ifndef MANTID_MATRIX_CURVE_H
-#define MANTID_MATRIX_CURVE_H
+#pragma once
 
 #include "MantidAPI/MatrixWorkspace.h"
 #include "MantidCurve.h"
@@ -159,5 +158,3 @@ private:
   /// y units
   Mantid::Kernel::Unit_sptr m_yUnits;
 };
-
-#endif // MANTID_CURVE_H
diff --git a/MantidPlot/src/Mantid/MantidMatrixDialog.h b/MantidPlot/src/Mantid/MantidMatrixDialog.h
index 23c4c4481d0..95bfa0dc73a 100644
--- a/MantidPlot/src/Mantid/MantidMatrixDialog.h
+++ b/MantidPlot/src/Mantid/MantidMatrixDialog.h
@@ -4,8 +4,7 @@
 //     NScD Oak Ridge National Laboratory, European Spallation Source
 //     & Institut Laue - Langevin
 // SPDX - License - Identifier: GPL - 3.0 +
-#ifndef MANTIDMATRIXDIALOG_H
-#define MANTIDMATRIXDIALOG_H
+#pragma once
 
 #include <QDialog>
 #include <QPointer>
@@ -44,5 +43,3 @@ private:
   QComboBox *boxFormat;
   QLineEdit *editRangeMin, *editRangeMax;
 };
-
-#endif // MANTIDMATRIXDIALOG_H
diff --git a/MantidPlot/src/Mantid/MantidMatrixDxExtensionHandler.h b/MantidPlot/src/Mantid/MantidMatrixDxExtensionHandler.h
index df48373a547..dbd89ddd01e 100644
--- a/MantidPlot/src/Mantid/MantidMatrixDxExtensionHandler.h
+++ b/MantidPlot/src/Mantid/MantidMatrixDxExtensionHandler.h
@@ -4,8 +4,7 @@
 //     NScD Oak Ridge National Laboratory, European Spallation Source
 //     & Institut Laue - Langevin
 // SPDX - License - Identifier: GPL - 3.0 +
-#ifndef MANTIDPLOT_MANTIDMATRIXDXEXTENSIONHANDLER_H
-#define MANTIDPLOT_MANTIDMATRIXDXEXTENSIONHANDLER_H
+#pragma once
 
 #include "IMantidMatrixExtensionHandler.h"
 #include "MantidMatrixModel.h"
@@ -31,5 +30,4 @@ public:
 
 private:
   MantidMatrixModel::Type m_type;
-};
-#endif
\ No newline at end of file
+};
\ No newline at end of file
diff --git a/MantidPlot/src/Mantid/MantidMatrixExtensionRequest.h b/MantidPlot/src/Mantid/MantidMatrixExtensionRequest.h
index d13ef7d37fb..8372847e6fe 100644
--- a/MantidPlot/src/Mantid/MantidMatrixExtensionRequest.h
+++ b/MantidPlot/src/Mantid/MantidMatrixExtensionRequest.h
@@ -4,8 +4,7 @@
 //     NScD Oak Ridge National Laboratory, European Spallation Source
 //     & Institut Laue - Langevin
 // SPDX - License - Identifier: GPL - 3.0 +
-#ifndef MANTIDPLOT_MANTIDMATRIXEXTENSIONREQUEST_H
-#define MANTIDPLOT_MANTIDMATRIXEXTENSIONREQUEST_H
+#pragma once
 
 #include "IMantidMatrixExtensionHandler.h"
 #include "MantidMatrixModel.h"
@@ -55,5 +54,3 @@ public:
 private:
   std::unique_ptr<IMantidMatrixExtensionHandler> m_extensionHandler;
 };
-
-#endif
\ No newline at end of file
diff --git a/MantidPlot/src/Mantid/MantidMatrixFunction.h b/MantidPlot/src/Mantid/MantidMatrixFunction.h
index a342a945b75..0ec3ef14172 100644
--- a/MantidPlot/src/Mantid/MantidMatrixFunction.h
+++ b/MantidPlot/src/Mantid/MantidMatrixFunction.h
@@ -4,8 +4,7 @@
 //     NScD Oak Ridge National Laboratory, European Spallation Source
 //     & Institut Laue - Langevin
 // SPDX - License - Identifier: GPL - 3.0 +
-#ifndef MANTIDMATRIXFUNCTION_H
-#define MANTIDMATRIXFUNCTION_H
+#pragma once
 
 #include "../UserFunction.h"
 #include "MantidMatrix.h"
@@ -92,5 +91,3 @@ private:
 
   friend class MantidMatrixFunctionWorkspaceObserver;
 };
-
-#endif // MANTIDMATRIXFUNCTION_H
diff --git a/MantidPlot/src/Mantid/MantidMatrixModel.h b/MantidPlot/src/Mantid/MantidMatrixModel.h
index 4cc14994200..c59c6da0f6c 100644
--- a/MantidPlot/src/Mantid/MantidMatrixModel.h
+++ b/MantidPlot/src/Mantid/MantidMatrixModel.h
@@ -4,8 +4,7 @@
 //     NScD Oak Ridge National Laboratory, European Spallation Source
 //     & Institut Laue - Langevin
 // SPDX - License - Identifier: GPL - 3.0 +
-#ifndef MANTIDPLOT_MANTIDMATRIXMODEL_H
-#define MANTIDPLOT_MANTIDMATRIXMODEL_H
+#pragma once
 
 #include "MantidAPI/MatrixWorkspace_fwd.h"
 
@@ -98,5 +97,3 @@ private:
   mutable QSet<int> m_maskCache; // masked flag cache
   mutable QHash<int, QSet<int>> m_maskBinCache; // cache for masked bins
 };
-
-#endif
diff --git a/MantidPlot/src/Mantid/MantidMatrixNullExtensionHandler.h b/MantidPlot/src/Mantid/MantidMatrixNullExtensionHandler.h
index 8710122c296..e57e967306c 100644
--- a/MantidPlot/src/Mantid/MantidMatrixNullExtensionHandler.h
+++ b/MantidPlot/src/Mantid/MantidMatrixNullExtensionHandler.h
@@ -4,8 +4,7 @@
 //     NScD Oak Ridge National Laboratory, European Spallation Source
 //     & Institut Laue - Langevin
 // SPDX - License - Identifier: GPL - 3.0 +
-#ifndef MANTIDPLOT_MANTIDMATRIXNULLEXTENSIONHANDLER_H
-#define MANTIDPLOT_MANTIDMATRIXNULLEXTENSIONHANDLER_H
+#pragma once
 
 #include "IMantidMatrixExtensionHandler.h"
 #include "MantidKernel/Logger.h"
@@ -74,5 +73,4 @@ public:
         "You have seemed to attached an invalid extension to the "
         "Mantid Matrix.");
   }
-};
-#endif
\ No newline at end of file
+};
\ No newline at end of file
diff --git a/MantidPlot/src/Mantid/MantidMatrixTabExtension.h b/MantidPlot/src/Mantid/MantidMatrixTabExtension.h
index f03a3d10fad..f09d553c02a 100644
--- a/MantidPlot/src/Mantid/MantidMatrixTabExtension.h
+++ b/MantidPlot/src/Mantid/MantidMatrixTabExtension.h
@@ -4,8 +4,7 @@
 //     NScD Oak Ridge National Laboratory, European Spallation Source
 //     & Institut Laue - Langevin
 // SPDX - License - Identifier: GPL - 3.0 +
-#ifndef MANTIDPLOT_MANTIDMATRIXTABEXTENSION_H
-#define MANTIDPLOT_MANTIDMATRIXTABEXTENSION_H
+#pragma once
 
 #include "MantidMatrixModel.h"
 
@@ -30,5 +29,4 @@ struct MantidMatrixTabExtension {
 };
 
 using MantidMatrixTabExtensionMap =
-    std::map<MantidMatrixModel::Type, MantidMatrixTabExtension>;
-#endif
+    std::map<MantidMatrixModel::Type, MantidMatrixTabExtension>;
\ No newline at end of file
diff --git a/MantidPlot/src/Mantid/MantidPlotUtilities.h b/MantidPlot/src/Mantid/MantidPlotUtilities.h
index 16a71b9eb40..0b78021ab26 100644
--- a/MantidPlot/src/Mantid/MantidPlotUtilities.h
+++ b/MantidPlot/src/Mantid/MantidPlotUtilities.h
@@ -4,8 +4,7 @@
 //     NScD Oak Ridge National Laboratory, European Spallation Source
 //     & Institut Laue - Langevin
 // SPDX - License - Identifier: GPL - 3.0 +
-#ifndef MANTIDPLOTUTILITIES_H_
-#define MANTIDPLOTUTILITIES_H_
+#pragma once
 
 #include "MantidQtWidgets/Common/MantidWSIndexDialog.h"
 
@@ -30,5 +29,3 @@ double getSingleWorkspaceLogValue(
 /// Returns a single custom log value
 double getSingleWorkspaceLogValue(size_t wsIndex,
                                   const std::set<double> &logValues);
-
-#endif // MANTIDPLOTUTILITIES_H_
diff --git a/MantidPlot/src/Mantid/MantidSampleLogDialog.h b/MantidPlot/src/Mantid/MantidSampleLogDialog.h
index d98f9e78fab..8e1fa9ba8a1 100644
--- a/MantidPlot/src/Mantid/MantidSampleLogDialog.h
+++ b/MantidPlot/src/Mantid/MantidSampleLogDialog.h
@@ -4,8 +4,7 @@
 //     NScD Oak Ridge National Laboratory, European Spallation Source
 //     & Institut Laue - Langevin
 // SPDX - License - Identifier: GPL - 3.0 +
-#ifndef MANTIDSAMPLELOGDIALOG_H_
-#define MANTIDSAMPLELOGDIALOG_H_
+#pragma once
 
 //----------------------------------
 // Includes
@@ -66,5 +65,3 @@ protected:
   /// A pointer to the MantidUI object
   MantidUI *m_mantidUI;
 };
-
-#endif // MANTIDSAMPLELOGDIALOG_H_
diff --git a/MantidPlot/src/Mantid/MantidSampleMaterialDialog.h b/MantidPlot/src/Mantid/MantidSampleMaterialDialog.h
index 6f9fe04232f..5937fa0eeea 100644
--- a/MantidPlot/src/Mantid/MantidSampleMaterialDialog.h
+++ b/MantidPlot/src/Mantid/MantidSampleMaterialDialog.h
@@ -4,8 +4,7 @@
 //     NScD Oak Ridge National Laboratory, European Spallation Source
 //     & Institut Laue - Langevin
 // SPDX - License - Identifier: GPL - 3.0 +
-#ifndef MANTIDSAMPLEMATERIALDIALOG_H_
-#define MANTIDSAMPLEMATERIALDIALOG_H_
+#pragma once
 
 //----------------------------------
 // Includes
@@ -54,5 +53,3 @@ private:
 
   Ui::MantidSampleMaterialDialog m_uiForm;
 };
-
-#endif // MANTIDSAMPLEMATERIALDIALOG_H_
diff --git a/MantidPlot/src/Mantid/MantidSurfaceContourPlotGenerator.h b/MantidPlot/src/Mantid/MantidSurfaceContourPlotGenerator.h
index 675d0c512d7..3b24b56db6d 100644
--- a/MantidPlot/src/Mantid/MantidSurfaceContourPlotGenerator.h
+++ b/MantidPlot/src/Mantid/MantidSurfaceContourPlotGenerator.h
@@ -4,8 +4,7 @@
 //     NScD Oak Ridge National Laboratory, European Spallation Source
 //     & Institut Laue - Langevin
 // SPDX - License - Identifier: GPL - 3.0 +
-#ifndef MANTIDSURFACECONTOURPLOTGENERATOR_H_
-#define MANTIDSURFACECONTOURPLOTGENERATOR_H_
+#pragma once
 
 #include "Graph3D.h"
 #include "MantidAPI/NumericAxis.h"
@@ -89,5 +88,3 @@ private:
   /// Pointer to the Mantid UI
   MantidQt::MantidWidgets::MantidDisplayBase *const m_mantidUI;
 };
-
-#endif
diff --git a/MantidPlot/src/Mantid/MantidTable.h b/MantidPlot/src/Mantid/MantidTable.h
index 454fa9ad2dd..8935e81ca95 100644
--- a/MantidPlot/src/Mantid/MantidTable.h
+++ b/MantidPlot/src/Mantid/MantidTable.h
@@ -4,8 +4,7 @@
 //     NScD Oak Ridge National Laboratory, European Spallation Source
 //     & Institut Laue - Langevin
 // SPDX - License - Identifier: GPL - 3.0 +
-#ifndef MANTIDTABLE_H
-#define MANTIDTABLE_H
+#pragma once
 
 #include "../Table.h"
 #include "MantidAPI/ITableWorkspace_fwd.h"
@@ -75,5 +74,3 @@ private:
   /// Show the table workspace transposed
   bool m_transposed;
 };
-
-#endif /* MANTIDTABLE_H */
diff --git a/MantidPlot/src/Mantid/MantidUI.h b/MantidPlot/src/Mantid/MantidUI.h
index 93f5ce9ddb6..8aa399e5628 100644
--- a/MantidPlot/src/Mantid/MantidUI.h
+++ b/MantidPlot/src/Mantid/MantidUI.h
@@ -4,8 +4,7 @@
 //     NScD Oak Ridge National Laboratory, European Spallation Source
 //     & Institut Laue - Langevin
 // SPDX - License - Identifier: GPL - 3.0 +
-#ifndef MANTIDUI_H
-#define MANTIDUI_H
+#pragma once
 
 //----------------------------------
 // Includes
@@ -699,5 +698,3 @@ public:
   /// Destructor restores original cursor
   virtual ~ScopedOverrideCursor() { QApplication::restoreOverrideCursor(); }
 };
-
-#endif
diff --git a/MantidPlot/src/Mantid/PeakPickerTool.h b/MantidPlot/src/Mantid/PeakPickerTool.h
index 0ba708c2c45..640b442d484 100644
--- a/MantidPlot/src/Mantid/PeakPickerTool.h
+++ b/MantidPlot/src/Mantid/PeakPickerTool.h
@@ -4,8 +4,7 @@
 //     NScD Oak Ridge National Laboratory, European Spallation Source
 //     & Institut Laue - Langevin
 // SPDX - License - Identifier: GPL - 3.0 +
-#ifndef PEAK_PICKER_TOOL_H
-#define PEAK_PICKER_TOOL_H
+#pragma once
 
 //---------------------------
 // Includes
@@ -209,5 +208,3 @@ private:
 
   QStringList m_curveNames; // Names of all curves added to graph()
 };
-
-#endif /* PEAK_PICKER_TOOL_H */
diff --git a/MantidPlot/src/Mantid/Preferences.h b/MantidPlot/src/Mantid/Preferences.h
index 8673e1399b3..0d7c7d41ef7 100644
--- a/MantidPlot/src/Mantid/Preferences.h
+++ b/MantidPlot/src/Mantid/Preferences.h
@@ -4,8 +4,7 @@
 //     NScD Oak Ridge National Laboratory, European Spallation Source
 //     & Institut Laue - Langevin
 // SPDX - License - Identifier: GPL - 3.0 +
-#ifndef MANTIDPREFERENCES_H
-#define MANTIDPREFERENCES_H
+#pragma once
 
 #include <QList>
 #include <QMap>
@@ -58,5 +57,3 @@ private:
   MantidPreferences();
   MantidPreferences(const MantidPreferences &);
 };
-
-#endif /* MANTIDPREFERENCES_H */
diff --git a/MantidPlot/src/Mantid/RemoveErrorsDialog.h b/MantidPlot/src/Mantid/RemoveErrorsDialog.h
index 23c56cc83dc..1dbdfd6fa36 100644
--- a/MantidPlot/src/Mantid/RemoveErrorsDialog.h
+++ b/MantidPlot/src/Mantid/RemoveErrorsDialog.h
@@ -4,8 +4,7 @@
 //     NScD Oak Ridge National Laboratory, European Spallation Source
 //     & Institut Laue - Langevin
 // SPDX - License - Identifier: GPL - 3.0 +
-#ifndef REMOVEERRORSDIALOG_H
-#define REMOVEERRORSDIALOG_H
+#pragma once
 
 #include <QDialog>
 
@@ -33,5 +32,3 @@ protected slots:
 private:
   Ui::RemoveErrorsDialog *ui;
 };
-
-#endif // REMOVEERRORSDIALOG_H
diff --git a/MantidPlot/src/Mantid/ReportUsageDisableDialog.h b/MantidPlot/src/Mantid/ReportUsageDisableDialog.h
index 91f3b6f22bf..ac41a9bafbe 100644
--- a/MantidPlot/src/Mantid/ReportUsageDisableDialog.h
+++ b/MantidPlot/src/Mantid/ReportUsageDisableDialog.h
@@ -4,8 +4,7 @@
 //     NScD Oak Ridge National Laboratory, European Spallation Source
 //     & Institut Laue - Langevin
 // SPDX - License - Identifier: GPL - 3.0 +
-#ifndef MANTIDPLOT_REPORT_USAGE_DISABLE_DIALOG
-#define MANTIDPLOT_REPORT_USAGE_DISABLE_DIALOG
+#pragma once
 
 #include <QDialog>
 
@@ -25,5 +24,3 @@ private:
   /// Adds the right side of the dialog layout into the parameter layout
   void addRightSide(QHBoxLayout *parentLayout, FirstTimeSetup *parent);
 };
-
-#endif // MANTIDPLOT_REPORT_USAGE_DISABLE_DIALOG
\ No newline at end of file
diff --git a/MantidPlot/src/Mantid/SampleLogDialogBase.h b/MantidPlot/src/Mantid/SampleLogDialogBase.h
index b193a1b3b70..c6ce9a444b5 100644
--- a/MantidPlot/src/Mantid/SampleLogDialogBase.h
+++ b/MantidPlot/src/Mantid/SampleLogDialogBase.h
@@ -4,8 +4,7 @@
 //     NScD Oak Ridge National Laboratory, European Spallation Source
 //     & Institut Laue - Langevin
 // SPDX - License - Identifier: GPL - 3.0 +
-#ifndef SAMPLELOGDIALOGBASE_H_
-#define SAMPLELOGDIALOGBASE_H_
+#pragma once
 
 //----------------------------------
 // Includes
@@ -154,5 +153,3 @@ public:
 private:
   Mantid::Kernel::TimeSeriesProperty<T> *m_prop;
 };
-
-#endif // SAMPLELOGDIALOGBASE_H_
diff --git a/MantidPlot/src/Mantid/UserFitFunctionDialog.h b/MantidPlot/src/Mantid/UserFitFunctionDialog.h
index 2ef543d5ba2..78d09c1a1b6 100644
--- a/MantidPlot/src/Mantid/UserFitFunctionDialog.h
+++ b/MantidPlot/src/Mantid/UserFitFunctionDialog.h
@@ -4,8 +4,7 @@
 //     NScD Oak Ridge National Laboratory, European Spallation Source
 //     & Institut Laue - Langevin
 // SPDX - License - Identifier: GPL - 3.0 +
-#ifndef USERFITFUNCTIONDIALOG_H
-#define USERFITFUNCTIONDIALOG_H
+#pragma once
 
 //----------------------------
 //   Includes
@@ -67,5 +66,3 @@ private:
   // The form generated with Qt Designer
   Ui::UserFitFunctionDialog ui;
 };
-
-#endif /* USERFITFUNCTIONDIALOG_H */
\ No newline at end of file
diff --git a/MantidPlot/src/Matrix.h b/MantidPlot/src/Matrix.h
index 5202c23ba86..5d15ee80410 100644
--- a/MantidPlot/src/Matrix.h
+++ b/MantidPlot/src/Matrix.h
@@ -30,8 +30,7 @@
  *   Boston, MA  02110-1301  USA                                           *
  *                                                                         *
  ***************************************************************************/
-#ifndef MATRIX_H
-#define MATRIX_H
+#pragma once
 
 #include <QHeaderView>
 #include <QMessageBox>
@@ -380,5 +379,3 @@ protected:
   //! Pointer to a data buffer used for matrix operations.
   double *d_workspace;
 };
-
-#endif
diff --git a/MantidPlot/src/MatrixCommand.h b/MantidPlot/src/MatrixCommand.h
index ff3ff8857a8..337b18de7f8 100644
--- a/MantidPlot/src/MatrixCommand.h
+++ b/MantidPlot/src/MatrixCommand.h
@@ -15,8 +15,7 @@
  *   Boston, MA  02110-1301  USA                                           *
  *                                                                         *
  ***************************************************************************/
-#ifndef MATRIX_COMMAND_H
-#define MATRIX_COMMAND_H
+#pragma once
 
 #include "Matrix.h"
 #include "MatrixModel.h"
@@ -288,5 +287,4 @@ private:
   int d_start_row, d_end_row, d_start_col, d_end_col, d_rows, d_cols,
       d_old_rows, d_old_cols;
   double *d_clipboard_data, *d_backup_data;
-};
-#endif
+};
\ No newline at end of file
diff --git a/MantidPlot/src/MatrixDialog.h b/MantidPlot/src/MatrixDialog.h
index 8c856a61b48..380c926b12b 100644
--- a/MantidPlot/src/MatrixDialog.h
+++ b/MantidPlot/src/MatrixDialog.h
@@ -15,8 +15,7 @@
  *   Boston, MA  02110-1301  USA                                           *
  *                                                                         *
  ***************************************************************************/
-#ifndef MATRIXDIALOG_H
-#define MATRIXDIALOG_H
+#pragma once
 
 #include <QDialog>
 
@@ -54,5 +53,3 @@ private:
   QSpinBox *boxColWidth, *boxPrecision;
   QComboBox *boxFormat, *boxNumericDisplay;
 };
-
-#endif // MATRIXDIALOG_H
diff --git a/MantidPlot/src/MatrixModel.h b/MantidPlot/src/MatrixModel.h
index f0b0e9454c3..25d70aa326d 100644
--- a/MantidPlot/src/MatrixModel.h
+++ b/MantidPlot/src/MatrixModel.h
@@ -16,8 +16,7 @@
  *                                                                         *
  ***************************************************************************/
 
-#ifndef MATRIXMODEL_H
-#define MATRIXMODEL_H
+#pragma once
 
 #include <QAbstractTableModel>
 #include <QLocale>
@@ -135,5 +134,3 @@ protected:
   gsl_permutation *d_inv_perm;
   QSize d_data_block_size;
 };
-
-#endif
diff --git a/MantidPlot/src/MatrixSizeDialog.h b/MantidPlot/src/MatrixSizeDialog.h
index ca0dfc53b56..7fdd7e1c9bc 100644
--- a/MantidPlot/src/MatrixSizeDialog.h
+++ b/MantidPlot/src/MatrixSizeDialog.h
@@ -15,8 +15,7 @@
  *   Boston, MA  02110-1301  USA                                           *
  *                                                                         *
  ***************************************************************************/
-#ifndef MATRIXSIZEDIALOG_H
-#define MATRIXSIZEDIALOG_H
+#pragma once
 
 #include "Matrix.h"
 #include <QDialog>
@@ -53,5 +52,3 @@ private:
   DoubleSpinBox *boxXStart, *boxYStart, *boxXEnd, *boxYEnd;
   Matrix *d_matrix;
 };
-
-#endif // MATRIXSIZEDIALOG_H
diff --git a/MantidPlot/src/MatrixValuesDialog.h b/MantidPlot/src/MatrixValuesDialog.h
index 909589da6b6..4db565ffb01 100644
--- a/MantidPlot/src/MatrixValuesDialog.h
+++ b/MantidPlot/src/MatrixValuesDialog.h
@@ -27,8 +27,7 @@
  *   Boston, MA  02110-1301  USA                                           *
  *                                                                         *
  ***************************************************************************/
-#ifndef MVALUESDIALOG_H
-#define MVALUESDIALOG_H
+#pragma once
 
 #include "Matrix.h"
 #include "Script.h"
@@ -68,5 +67,3 @@ private:
   QSpinBox *startRow, *endRow, *startCol, *endCol;
   QPushButton *btnApply;
 };
-
-#endif //
diff --git a/MantidPlot/src/MdPlottingCmapsProvider.h b/MantidPlot/src/MdPlottingCmapsProvider.h
index 9edd14dc0b9..36b25ff9152 100644
--- a/MantidPlot/src/MdPlottingCmapsProvider.h
+++ b/MantidPlot/src/MdPlottingCmapsProvider.h
@@ -4,8 +4,7 @@
 //     NScD Oak Ridge National Laboratory, European Spallation Source
 //     & Institut Laue - Langevin
 // SPDX - License - Identifier: GPL - 3.0 +
-#ifndef MDPLOTTINGCMAPSPROVIDER_H_
-#define MDPLOTTINGCMAPSPROVIDER_H_
+#pragma once
 
 #include <QString>
 #include <vector>
@@ -68,5 +67,3 @@ private:
   getSliceViewerIndicesForCommonColorMaps(QStringList colorMapNamesSliceViewer,
                                           QStringList colorMapNamesVsi);
 };
-
-#endif
diff --git a/MantidPlot/src/MdiSubWindow.h b/MantidPlot/src/MdiSubWindow.h
index e7e5e672fb9..87c7330c641 100644
--- a/MantidPlot/src/MdiSubWindow.h
+++ b/MantidPlot/src/MdiSubWindow.h
@@ -26,8 +26,7 @@
  *   Boston, MA  02110-1301  USA                                           *
  *                                                                         *
  ***************************************************************************/
-#ifndef MdiSubWindow_H
-#define MdiSubWindow_H
+#pragma once
 
 #include "MantidKernel/RegistrationHelper.h"
 #include "MantidQtWidgets/Common/IProjectSerialisable.h"
@@ -371,5 +370,3 @@ using MDIWindowList = QList<MdiSubWindow *>;
 // Helper macro to subscribe a class to the factory with the same name as the
 // class name
 #define DECLARE_WINDOW(classname) DECLARE_WINDOW_WITH_NAME(classname, classname)
-
-#endif
diff --git a/MantidPlot/src/MenuWithToolTips.h b/MantidPlot/src/MenuWithToolTips.h
index b5282a26ccb..a33ddd27a7c 100644
--- a/MantidPlot/src/MenuWithToolTips.h
+++ b/MantidPlot/src/MenuWithToolTips.h
@@ -4,8 +4,7 @@
 //     NScD Oak Ridge National Laboratory, European Spallation Source
 //     & Institut Laue - Langevin
 // SPDX - License - Identifier: GPL - 3.0 +
-#ifndef MENU_WITH_TOOLTIPS
-#define MENU_WITH_TOOLTIPS
+#pragma once
 
 #include <QMenu>
 
@@ -19,5 +18,3 @@ public:
   MenuWithToolTips(const QString &title, QWidget *parent = nullptr);
   bool event(QEvent *e) override;
 };
-
-#endif // MENU_WITH_TOOLTIPS
diff --git a/MantidPlot/src/MultiLayer.h b/MantidPlot/src/MultiLayer.h
index cf209345845..ad453f12b18 100644
--- a/MantidPlot/src/MultiLayer.h
+++ b/MantidPlot/src/MultiLayer.h
@@ -29,8 +29,7 @@
  *   Boston, MA  02110-1301  USA                                           *
  *                                                                         *
  ***************************************************************************/
-#ifndef MULTILAYER_H
-#define MULTILAYER_H
+#pragma once
 
 #include "Graph.h"
 #include "MantidQtWidgets/Common/IProjectSerialisable.h"
@@ -314,5 +313,3 @@ private:
   QRadioButton *m_lineRadioButton;
   ColorButton *m_colourBox;
 };
-
-#endif
diff --git a/MantidPlot/src/MultiPeakFit.h b/MantidPlot/src/MultiPeakFit.h
index a9e0d9b9090..36e2b321653 100644
--- a/MantidPlot/src/MultiPeakFit.h
+++ b/MantidPlot/src/MultiPeakFit.h
@@ -28,8 +28,7 @@
  *   Boston, MA  02110-1301  USA                                           *
  *                                                                         *
  ***************************************************************************/
-#ifndef MULTIPEAKFIT_H
-#define MULTIPEAKFIT_H
+#pragma once
 
 #include "Fit.h"
 
@@ -132,5 +131,4 @@ public:
 private:
   void init();
   void calculateFitCurveData(double *X, double *Y) override;
-};
-#endif
+};
\ No newline at end of file
diff --git a/MantidPlot/src/MultiPeakFitTool.h b/MantidPlot/src/MultiPeakFitTool.h
index 625e6d48f81..23591f36231 100644
--- a/MantidPlot/src/MultiPeakFitTool.h
+++ b/MantidPlot/src/MultiPeakFitTool.h
@@ -26,8 +26,7 @@
  *   Boston, MA  02110-1301  USA                                           *
  *                                                                         *
  ***************************************************************************/
-#ifndef MULTI_PEAK_FIT_TOOL
-#define MULTI_PEAK_FIT_TOOL
+#pragma once
 
 #include "MultiPeakFit.h"
 #include "PlotToolInterface.h"
@@ -76,5 +75,3 @@ private:
   MultiPeakFit *d_fit;
   QwtPlotCurve *d_curve;
 };
-
-#endif // ifndef MULTI_PEAK_FIT_TOOL
diff --git a/MantidPlot/src/MultiTabScriptInterpreter.h b/MantidPlot/src/MultiTabScriptInterpreter.h
index c57a57742e3..710018f499a 100644
--- a/MantidPlot/src/MultiTabScriptInterpreter.h
+++ b/MantidPlot/src/MultiTabScriptInterpreter.h
@@ -4,8 +4,7 @@
 //     NScD Oak Ridge National Laboratory, European Spallation Source
 //     & Institut Laue - Langevin
 // SPDX - License - Identifier: GPL - 3.0 +
-#ifndef SCRIPTMANAGERWIDGET_H_
-#define SCRIPTMANAGERWIDGET_H_
+#pragma once
 
 //---------------------------------------------------------
 // Includes
@@ -241,5 +240,3 @@ private:
   // Save the line wrapping preference
   bool m_LineWrapping;
 };
-
-#endif
diff --git a/MantidPlot/src/MyParser.h b/MantidPlot/src/MyParser.h
index 89f92d41f20..9d91ce50305 100644
--- a/MantidPlot/src/MyParser.h
+++ b/MantidPlot/src/MyParser.h
@@ -15,8 +15,7 @@
  *   Boston, MA  02110-1301  USA                                           *
  *                                                                         *
  ***************************************************************************/
-#ifndef MYPARSER_H
-#define MYPARSER_H
+#pragma once
 
 #include "MantidGeometry/muParser_Silent.h"
 #include <gsl/gsl_math.h>
@@ -65,5 +64,3 @@ public:
   static double gammaln(double x) { return gsl_sf_lngamma(x); }
   static double hazard(double x) { return gsl_sf_hazard(x); }
 };
-
-#endif
diff --git a/MantidPlot/src/NonLinearFit.h b/MantidPlot/src/NonLinearFit.h
index 848aa75b19c..5c0cd4b488a 100644
--- a/MantidPlot/src/NonLinearFit.h
+++ b/MantidPlot/src/NonLinearFit.h
@@ -27,8 +27,7 @@
  *   Boston, MA  02110-1301  USA                                           *
  *                                                                         *
  ***************************************************************************/
-#ifndef NONLINEARFIT_H
-#define NONLINEARFIT_H
+#pragma once
 
 #include "Fit.h"
 
@@ -51,5 +50,4 @@ public:
 private:
   void calculateFitCurveData(double *X, double *Y) override;
   void init();
-};
-#endif
+};
\ No newline at end of file
diff --git a/MantidPlot/src/Note.h b/MantidPlot/src/Note.h
index b4ac064b838..d338954d356 100644
--- a/MantidPlot/src/Note.h
+++ b/MantidPlot/src/Note.h
@@ -27,8 +27,7 @@
  *   Boston, MA  02110-1301  USA                                           *
  *                                                                         *
  ***************************************************************************/
-#ifndef NOTE_H
-#define NOTE_H
+#pragma once
 
 #include "MantidQtWidgets/Common/IProjectSerialisable.h"
 #include "MdiSubWindow.h"
@@ -72,5 +71,3 @@ public slots:
 private:
   QTextEdit *te;
 };
-
-#endif
diff --git a/MantidPlot/src/OpenProjectDialog.h b/MantidPlot/src/OpenProjectDialog.h
index 6f8a49131c0..926c146175f 100644
--- a/MantidPlot/src/OpenProjectDialog.h
+++ b/MantidPlot/src/OpenProjectDialog.h
@@ -26,8 +26,7 @@
  *   Boston, MA  02110-1301  USA                                           *
  *                                                                         *
  ***************************************************************************/
-#ifndef OPEN_PROJECT_DIALOG_H
-#define OPEN_PROJECT_DIALOG_H
+#pragma once
 
 #include "ExtensibleFileDialog.h"
 
@@ -48,5 +47,3 @@ protected slots:
   //! Update which options are visible and enabled based on the output format.
   void updateAdvancedOptions(const QString &filter);
 };
-
-#endif // ifndef OPEN_PROJECT_DIALOG_H
diff --git a/MantidPlot/src/Plot.h b/MantidPlot/src/Plot.h
index 72efcddb178..8ea784c5104 100644
--- a/MantidPlot/src/Plot.h
+++ b/MantidPlot/src/Plot.h
@@ -27,8 +27,7 @@
  *   Boston, MA  02110-1301  USA                                           *
  *                                                                         *
  ***************************************************************************/
-#ifndef PLOT_H
-#define PLOT_H
+#pragma once
 
 #include <QLocale>
 #include <QMap>
@@ -142,5 +141,4 @@ protected:
   int minTickLength, majTickLength;
   int marker_key;
   int curve_key;
-};
-#endif
+};
\ No newline at end of file
diff --git a/MantidPlot/src/Plot3DDialog.h b/MantidPlot/src/Plot3DDialog.h
index 8fe93985cf8..99ed126b8f1 100644
--- a/MantidPlot/src/Plot3DDialog.h
+++ b/MantidPlot/src/Plot3DDialog.h
@@ -15,8 +15,7 @@
  *   Boston, MA  02110-1301  USA                                           *
  *                                                                         *
  ***************************************************************************/
-#ifndef PLOT3DDIALOG_H
-#define PLOT3DDIALOG_H
+#pragma once
 
 #include "Graph3D.h"
 #include <QCheckBox>
@@ -114,5 +113,3 @@ private:
   double zScale;
   double zoom;
 };
-
-#endif
diff --git a/MantidPlot/src/PlotCurve.h b/MantidPlot/src/PlotCurve.h
index d4c6ea1b1bf..33fa78063ae 100644
--- a/MantidPlot/src/PlotCurve.h
+++ b/MantidPlot/src/PlotCurve.h
@@ -26,8 +26,7 @@
  *   Boston, MA  02110-1301  USA                                           *
  *                                                                         *
  ***************************************************************************/
-#ifndef PLOTCURVE_H
-#define PLOTCURVE_H
+#pragma once
 
 #include "Table.h"
 #include <qwt_plot_curve.h>
@@ -278,5 +277,4 @@ protected:
   double d_label_x_offset;
   //! y coordinate offset
   double d_label_y_offset;
-};
-#endif
+};
\ No newline at end of file
diff --git a/MantidPlot/src/PlotDialog.h b/MantidPlot/src/PlotDialog.h
index ad6ceeaa66f..beb8d8a62a2 100644
--- a/MantidPlot/src/PlotDialog.h
+++ b/MantidPlot/src/PlotDialog.h
@@ -27,8 +27,7 @@
  *   Boston, MA  02110-1301  USA                                           *
  *                                                                         *
  ***************************************************************************/
-#ifndef PLOTDIALOG_H
-#define PLOTDIALOG_H
+#pragma once
 
 #include "MultiLayer.h"
 #include <QDialog>
@@ -321,5 +320,3 @@ public:
 protected:
   QwtPlotItem *d_curve;
 };
-
-#endif
diff --git a/MantidPlot/src/PlotToolInterface.h b/MantidPlot/src/PlotToolInterface.h
index 72655bb2fbe..77c59d975e2 100644
--- a/MantidPlot/src/PlotToolInterface.h
+++ b/MantidPlot/src/PlotToolInterface.h
@@ -26,8 +26,7 @@
  *   Boston, MA  02110-1301  USA                                           *
  *                                                                         *
  ***************************************************************************/
-#ifndef PLOT_TOOL_INTERFACE_H
-#define PLOT_TOOL_INTERFACE_H
+#pragma once
 
 class Graph;
 
@@ -93,5 +92,3 @@ public:
 protected:
   Graph *d_graph;
 };
-
-#endif // ifndef PLOT_TOOL_INTERFACE_H
diff --git a/MantidPlot/src/PlotWizard.h b/MantidPlot/src/PlotWizard.h
index 0ffa0e60cb6..e7e69ff2ef4 100644
--- a/MantidPlot/src/PlotWizard.h
+++ b/MantidPlot/src/PlotWizard.h
@@ -28,8 +28,7 @@
  *                                                                         *
  ***************************************************************************/
 
-#ifndef PLOTWIZARD_H
-#define PLOTWIZARD_H
+#pragma once
 
 #include <QDialog>
 class QGroupBox;
@@ -118,5 +117,3 @@ signals:
   //! Emitted when new plots need to be created
   void plot(const QStringList &);
 };
-
-#endif //  PLOTWIZARD_H
diff --git a/MantidPlot/src/PluginFit.h b/MantidPlot/src/PluginFit.h
index ad3c01dcfa8..23052730f41 100644
--- a/MantidPlot/src/PluginFit.h
+++ b/MantidPlot/src/PluginFit.h
@@ -27,8 +27,7 @@
  *   Boston, MA  02110-1301  USA                                           *
  *                                                                         *
  ***************************************************************************/
-#ifndef PLUGINFIT_H
-#define PLUGINFIT_H
+#pragma once
 
 #include "Fit.h"
 
@@ -51,5 +50,4 @@ private:
   using fitFunctionEval = double (*)(double, double *);
   void calculateFitCurveData(double *X, double *Y) override;
   fitFunctionEval f_eval;
-};
-#endif
+};
\ No newline at end of file
diff --git a/MantidPlot/src/PolynomFitDialog.h b/MantidPlot/src/PolynomFitDialog.h
index b2bf39b1d00..148607e92d5 100644
--- a/MantidPlot/src/PolynomFitDialog.h
+++ b/MantidPlot/src/PolynomFitDialog.h
@@ -27,8 +27,7 @@
  *   Boston, MA  02110-1301  USA                                           *
  *                                                                         *
  ***************************************************************************/
-#ifndef POLINOMFITDIALOG_H
-#define POLINOMFITDIALOG_H
+#pragma once
 
 #include <QDialog>
 
@@ -66,5 +65,3 @@ private:
   QLineEdit *boxEnd;
   ColorBox *boxColor;
 };
-
-#endif
diff --git a/MantidPlot/src/PolynomialFit.h b/MantidPlot/src/PolynomialFit.h
index 0b13c6293bc..dbd7e78f6e3 100644
--- a/MantidPlot/src/PolynomialFit.h
+++ b/MantidPlot/src/PolynomialFit.h
@@ -26,8 +26,7 @@
  *   Boston, MA  02110-1301  USA                                           *
  *                                                                         *
  ***************************************************************************/
-#ifndef POLYNOMIALFIT_H
-#define POLYNOMIALFIT_H
+#pragma once
 
 #include "Fit.h"
 
@@ -101,5 +100,4 @@ public:
 private:
   void init();
   void calculateFitCurveData(double *X, double *Y) override;
-};
-#endif
+};
\ No newline at end of file
diff --git a/MantidPlot/src/PrecompiledHeader.h b/MantidPlot/src/PrecompiledHeader.h
index e945ad272f6..30dfb0d84f8 100644
--- a/MantidPlot/src/PrecompiledHeader.h
+++ b/MantidPlot/src/PrecompiledHeader.h
@@ -4,8 +4,7 @@
 //     NScD Oak Ridge National Laboratory, European Spallation Source
 //     & Institut Laue - Langevin
 // SPDX - License - Identifier: GPL - 3.0 +
-#ifndef MANTIDPLOT_PRECOMPILEDHEADER_H_
-#define MANTIDPLOT_PRECOMPILEDHEADER_H_
+#pragma once
 
 // Mantid
 #include "MantidAPI/AnalysisDataService.h"
@@ -20,5 +19,3 @@
 #include <set>
 #include <string>
 #include <vector>
-
-#endif // MANTIDPLOT_PRECOMPILEDHEADER_H_
\ No newline at end of file
diff --git a/MantidPlot/src/Processes.h b/MantidPlot/src/Processes.h
index 8d812a03351..c8c2736146c 100644
--- a/MantidPlot/src/Processes.h
+++ b/MantidPlot/src/Processes.h
@@ -4,8 +4,7 @@
 //     NScD Oak Ridge National Laboratory, European Spallation Source
 //     & Institut Laue - Langevin
 // SPDX - License - Identifier: GPL - 3.0 +
-#ifndef PROCESSES_H_
-#define PROCESSES_H_
+#pragma once
 
 /*
  * Access information about the process and others
@@ -15,5 +14,4 @@ namespace Processes {
 
 unsigned int numberOfMantids();
 long long getProcessID();
-} // namespace Processes
-#endif // PROCESSES_H_
+} // namespace Processes
\ No newline at end of file
diff --git a/MantidPlot/src/ProjectRecovery.h b/MantidPlot/src/ProjectRecovery.h
index c1af1ebb79e..a28c45600c9 100644
--- a/MantidPlot/src/ProjectRecovery.h
+++ b/MantidPlot/src/ProjectRecovery.h
@@ -4,8 +4,7 @@
 //     NScD Oak Ridge National Laboratory, European Spallation Source
 //     & Institut Laue - Langevin
 // SPDX - License - Identifier: GPL - 3.0 +
-#ifndef PROJECT_RECOVERY_H_
-#define PROJECT_RECOVERY_H_
+#pragma once
 
 #include "MantidAPI/Workspace.h"
 #include "MantidKernel/ConfigService.h"
@@ -232,5 +231,3 @@ private:
       "SaveZODS"};
 };
 } // namespace MantidQt
-
-#endif // PROJECT_RECOVERY_H_
diff --git a/MantidPlot/src/ProjectRecoveryGUIs/ProjectRecoveryModel.h b/MantidPlot/src/ProjectRecoveryGUIs/ProjectRecoveryModel.h
index ecb09ab3c4f..9e721805706 100644
--- a/MantidPlot/src/ProjectRecoveryGUIs/ProjectRecoveryModel.h
+++ b/MantidPlot/src/ProjectRecoveryGUIs/ProjectRecoveryModel.h
@@ -4,8 +4,7 @@
 //     NScD Oak Ridge National Laboratory, European Spallation Source
 //     & Institut Laue - Langevin
 // SPDX - License - Identifier: GPL - 3.0 +
-#ifndef PROJECTRECOVERYMODEL_H
-#define PROJECTRECOVERYMODEL_H
+#pragma once
 
 #include <Poco/Path.h>
 #include <memory>
@@ -42,5 +41,3 @@ private:
   bool m_failedRun;
   bool m_recoveryRunning;
 };
-
-#endif // PROJECTRECOVERYMODEL_H
diff --git a/MantidPlot/src/ProjectRecoveryGUIs/ProjectRecoveryPresenter.h b/MantidPlot/src/ProjectRecoveryGUIs/ProjectRecoveryPresenter.h
index 08150456f8c..50563910e65 100644
--- a/MantidPlot/src/ProjectRecoveryGUIs/ProjectRecoveryPresenter.h
+++ b/MantidPlot/src/ProjectRecoveryGUIs/ProjectRecoveryPresenter.h
@@ -4,8 +4,7 @@
 //     NScD Oak Ridge National Laboratory, European Spallation Source
 //     & Institut Laue - Langevin
 // SPDX - License - Identifier: GPL - 3.0 +
-#ifndef PROJECTRECOVERYPRESENTER_H
-#define PROJECTRECOVERYPRESENTER_H
+#pragma once
 
 #include "ProjectRecoveryModel.h"
 #include <QDialog>
@@ -53,5 +52,3 @@ private:
   OpenView m_openView;
   bool m_startMantidNormallyCalled;
 };
-
-#endif // PROJECTRECOVERYPRESENTER_H
diff --git a/MantidPlot/src/ProjectRecoveryGUIs/ProjectRecoveryView.h b/MantidPlot/src/ProjectRecoveryGUIs/ProjectRecoveryView.h
index 3bf88f28a70..4553c5bb08a 100644
--- a/MantidPlot/src/ProjectRecoveryGUIs/ProjectRecoveryView.h
+++ b/MantidPlot/src/ProjectRecoveryGUIs/ProjectRecoveryView.h
@@ -4,8 +4,7 @@
 //     NScD Oak Ridge National Laboratory, European Spallation Source
 //     & Institut Laue - Langevin
 // SPDX - License - Identifier: GPL - 3.0 +
-#ifndef PROJECTRECOVERYVIEW_H
-#define PROJECTRECOVERYVIEW_H
+#pragma once
 
 #include "ProjectRecoveryPresenter.h"
 #include "ui_ProjectRecoveryWidget.h"
@@ -42,5 +41,3 @@ private:
   std::unique_ptr<Ui::ProjectRecoveryWidget> m_ui;
   ProjectRecoveryPresenter *m_presenter;
 };
-
-#endif // PROJECTRECOVERYVIEW_H
diff --git a/MantidPlot/src/ProjectRecoveryGUIs/RecoveryFailureView.h b/MantidPlot/src/ProjectRecoveryGUIs/RecoveryFailureView.h
index 6a6c63a7bf6..3fc779cc9d2 100644
--- a/MantidPlot/src/ProjectRecoveryGUIs/RecoveryFailureView.h
+++ b/MantidPlot/src/ProjectRecoveryGUIs/RecoveryFailureView.h
@@ -4,8 +4,7 @@
 //     NScD Oak Ridge National Laboratory, European Spallation Source
 //     & Institut Laue - Langevin
 // SPDX - License - Identifier: GPL - 3.0 +
-#ifndef RECOVERYFAILUREVIEW_H
-#define RECOVERYFAILUREVIEW_H
+#pragma once
 
 #include "ProjectRecoveryPresenter.h"
 #include "ui_RecoveryFailure.h"
@@ -44,5 +43,3 @@ private:
   std::unique_ptr<Ui::RecoveryFailure> m_ui;
   ProjectRecoveryPresenter *m_presenter;
 };
-
-#endif // RECOVERYFAILUREVIEW_H
diff --git a/MantidPlot/src/ProjectRecoveryGUIs/RecoveryThread.h b/MantidPlot/src/ProjectRecoveryGUIs/RecoveryThread.h
index 377f30adb79..ad01ab61fe3 100644
--- a/MantidPlot/src/ProjectRecoveryGUIs/RecoveryThread.h
+++ b/MantidPlot/src/ProjectRecoveryGUIs/RecoveryThread.h
@@ -4,8 +4,7 @@
 //     NScD Oak Ridge National Laboratory, European Spallation Source
 //     & Institut Laue - Langevin
 // SPDX - License - Identifier: GPL - 3.0 +
-#ifndef RECOVERYTHREAD_H_
-#define RECOVERYTHREAD_H_
+#pragma once
 
 #include <Poco/Path.h>
 #include <QThread>
@@ -31,5 +30,3 @@ private:
   Poco::Path m_checkpoint;
   MantidQt::ProjectRecovery *m_projRec;
 };
-
-#endif /*RECOVERYTHREAD_H_*/
\ No newline at end of file
diff --git a/MantidPlot/src/ProjectSaveView.h b/MantidPlot/src/ProjectSaveView.h
index 16e0708ff94..14f217f56db 100644
--- a/MantidPlot/src/ProjectSaveView.h
+++ b/MantidPlot/src/ProjectSaveView.h
@@ -4,8 +4,7 @@
 //     NScD Oak Ridge National Laboratory, European Spallation Source
 //     & Institut Laue - Langevin
 // SPDX - License - Identifier: GPL - 3.0 +
-#ifndef MANTIDQT_MANTIDWIDGETS_PROJECTSAVEVIEW_H
-#define MANTIDQT_MANTIDWIDGETS_PROJECTSAVEVIEW_H
+#pragma once
 
 #include "MantidQtWidgets/Common/IProjectSaveView.h"
 #include "MantidQtWidgets/Common/IProjectSerialisable.h"
@@ -121,5 +120,4 @@ private:
   Ui::ProjectSave m_ui;
 };
 } // namespace MantidWidgets
-} // namespace MantidQt
-#endif /* MANTIDQT_MANTIDWIDGETS_PROJECTSAVEVIEW_H */
+} // namespace MantidQt
\ No newline at end of file
diff --git a/MantidPlot/src/ProjectSerialiser.h b/MantidPlot/src/ProjectSerialiser.h
index 37ca679351f..61dd4c82171 100644
--- a/MantidPlot/src/ProjectSerialiser.h
+++ b/MantidPlot/src/ProjectSerialiser.h
@@ -4,8 +4,7 @@
 //     NScD Oak Ridge National Laboratory, European Spallation Source
 //     & Institut Laue - Langevin
 // SPDX - License - Identifier: GPL - 3.0 +
-#ifndef PROJECT_SERIALISER_H
-#define PROJECT_SERIALISER_H
+#pragma once
 
 #include <string>
 #include <unordered_map>
@@ -163,5 +162,3 @@ private:
 };
 } // namespace API
 } // namespace MantidQt
-
-#endif // PROJECT_SERIALISER_H
diff --git a/MantidPlot/src/PythonScript.h b/MantidPlot/src/PythonScript.h
index ce5e2b963bc..f5a5871db4d 100644
--- a/MantidPlot/src/PythonScript.h
+++ b/MantidPlot/src/PythonScript.h
@@ -15,8 +15,7 @@
  *   Boston, MA  02110-1301  USA                                           *
  *                                                                         *
  ***************************************************************************/
-#ifndef PYTHON_SCRIPT_H
-#define PYTHON_SCRIPT_H
+#pragma once
 
 #include "MantidPythonInterface/core/GlobalInterpreterLock.h"
 #include "MantidQtWidgets/Common/WorkspaceObserver.h"
@@ -195,5 +194,3 @@ private:
   /// as they need to store state between calls.
   PyGILState_STATE m_recursiveAsyncGIL;
 };
-
-#endif
diff --git a/MantidPlot/src/PythonScripting.h b/MantidPlot/src/PythonScripting.h
index fbb515b0a73..5023de42385 100644
--- a/MantidPlot/src/PythonScripting.h
+++ b/MantidPlot/src/PythonScripting.h
@@ -15,8 +15,7 @@
  *   Boston, MA  02110-1301  USA                                           *
  *                                                                         *
  ***************************************************************************/
-#ifndef PYTHON_SCRIPTING_H
-#define PYTHON_SCRIPTING_H
+#pragma once
 
 #include "PythonScript.h"
 #include "ScriptingEnv.h"
@@ -129,5 +128,3 @@ private:
   /// Pointer to the main threads state
   PyThreadState *m_mainThreadState;
 };
-
-#endif
diff --git a/MantidPlot/src/QwtBarCurve.h b/MantidPlot/src/QwtBarCurve.h
index 892fdb53690..3107f771305 100644
--- a/MantidPlot/src/QwtBarCurve.h
+++ b/MantidPlot/src/QwtBarCurve.h
@@ -27,8 +27,7 @@
  *   Boston, MA  02110-1301  USA                                           *
  *                                                                         *
  ***************************************************************************/
-#ifndef BARCURVE_H
-#define BARCURVE_H
+#pragma once
 
 #include "PlotCurve.h"
 #include <qwt_plot.h>
@@ -63,5 +62,3 @@ private:
   int bar_gap, bar_offset;
   BarStyle bar_style;
 };
-
-#endif
diff --git a/MantidPlot/src/QwtErrorPlotCurve.h b/MantidPlot/src/QwtErrorPlotCurve.h
index 046db134f8e..de66cbcfbb4 100644
--- a/MantidPlot/src/QwtErrorPlotCurve.h
+++ b/MantidPlot/src/QwtErrorPlotCurve.h
@@ -27,8 +27,7 @@
  *   Boston, MA  02110-1301  USA                                           *
  *                                                                         *
  ***************************************************************************/
-#ifndef ERRORBARS_H
-#define ERRORBARS_H
+#pragma once
 
 #include "Mantid/ErrorBarSettings.h"
 #include "PlotCurve.h"
@@ -93,5 +92,3 @@ private:
   //! Reference to the master curve to which this error bars curve is attached.
   DataCurve *d_master_curve;
 };
-
-#endif
diff --git a/MantidPlot/src/RangeSelectorTool.h b/MantidPlot/src/RangeSelectorTool.h
index cd41a66d039..3b0c07b32d7 100644
--- a/MantidPlot/src/RangeSelectorTool.h
+++ b/MantidPlot/src/RangeSelectorTool.h
@@ -26,8 +26,7 @@
  *   Boston, MA  02110-1301  USA                                           *
  *                                                                         *
  ***************************************************************************/
-#ifndef RANGE_SELECTOR_TOOL_H
-#define RANGE_SELECTOR_TOOL_H
+#pragma once
 
 #include "PlotToolInterface.h"
 #include <qwt_double_rect.h>
@@ -109,5 +108,3 @@ private:
   bool d_enabled;
   bool d_visible;
 };
-
-#endif // ifndef RANGE_SELECTOR_TOOL_H
diff --git a/MantidPlot/src/RenameWindowDialog.h b/MantidPlot/src/RenameWindowDialog.h
index b63ed8bc83c..2307e1af7f3 100644
--- a/MantidPlot/src/RenameWindowDialog.h
+++ b/MantidPlot/src/RenameWindowDialog.h
@@ -27,8 +27,7 @@
  *   Boston, MA  02110-1301  USA                                           *
  *                                                                         *
  ***************************************************************************/
-#ifndef RENAMEDIALOG_H
-#define RENAMEDIALOG_H
+#pragma once
 
 #include <qdialog.h>
 #include <qvariant.h>
@@ -71,5 +70,3 @@ signals:
 private:
   MdiSubWindow *window;
 };
-
-#endif // EXPORTDIALOG_H
diff --git a/MantidPlot/src/ScaleDetails.h b/MantidPlot/src/ScaleDetails.h
index 24648d0b41b..b5d03318d48 100644
--- a/MantidPlot/src/ScaleDetails.h
+++ b/MantidPlot/src/ScaleDetails.h
@@ -13,8 +13,7 @@ from the University of Derby
 @date 15/09/2013
 */
 
-#ifndef SCALEDETAILS_H_
-#define SCALEDETAILS_H_
+#pragma once
 
 #include <QList>
 #include <QWidget>
@@ -80,5 +79,3 @@ private:
   void checkstep();
   bool validate();
 };
-
-#endif /* ScaleDetails_H_ */
diff --git a/MantidPlot/src/ScaleDraw.h b/MantidPlot/src/ScaleDraw.h
index 1d226556510..20b97063f98 100644
--- a/MantidPlot/src/ScaleDraw.h
+++ b/MantidPlot/src/ScaleDraw.h
@@ -15,8 +15,7 @@
  *   Boston, MA  02110-1301  USA                                           *
  *                                                                         *
  ***************************************************************************/
-#ifndef SCALES_H
-#define SCALES_H
+#pragma once
 
 #include <QDateTime>
 #include <QLocale>
@@ -128,5 +127,4 @@ private:
   QString d_format_info;
   //! Stores the labels for Txt scales
   QStringList d_text_labels;
-};
-#endif
+};
\ No newline at end of file
diff --git a/MantidPlot/src/ScreenPickerTool.h b/MantidPlot/src/ScreenPickerTool.h
index d3710be8fa1..020edd138aa 100644
--- a/MantidPlot/src/ScreenPickerTool.h
+++ b/MantidPlot/src/ScreenPickerTool.h
@@ -26,8 +26,7 @@
  *   Boston, MA  02110-1301  USA                                           *
  *                                                                         *
  ***************************************************************************/
-#ifndef SCREEN_PICKER_TOOL_H
-#define SCREEN_PICKER_TOOL_H
+#pragma once
 
 #include "PlotToolInterface.h"
 #include <QObject>
@@ -86,5 +85,3 @@ protected:
   Table *d_table;
   ApplicationWindow *d_app;
 };
-
-#endif // ifndef SCREEN_PICKER_TOOL_H
diff --git a/MantidPlot/src/Script.h b/MantidPlot/src/Script.h
index 797694c119c..be530a9e7ad 100644
--- a/MantidPlot/src/Script.h
+++ b/MantidPlot/src/Script.h
@@ -26,8 +26,7 @@
  *   Boston, MA  02110-1301  USA                                           *
  *                                                                         *
  ***************************************************************************/
-#ifndef SCRIPT_H
-#define SCRIPT_H
+#pragma once
 
 #include <QEvent>
 #include <QFuture>
@@ -192,5 +191,3 @@ private:
 
   ScriptThreadPool *m_thread;
 };
-
-#endif
diff --git a/MantidPlot/src/ScriptCode.h b/MantidPlot/src/ScriptCode.h
index 3b1483013f8..ad5fb449288 100644
--- a/MantidPlot/src/ScriptCode.h
+++ b/MantidPlot/src/ScriptCode.h
@@ -4,8 +4,7 @@
 //     NScD Oak Ridge National Laboratory, European Spallation Source
 //     & Institut Laue - Langevin
 // SPDX - License - Identifier: GPL - 3.0 +
-#ifndef SCRIPTCODE_H_
-#define SCRIPTCODE_H_
+#pragma once
 
 #include <QString>
 
@@ -43,5 +42,3 @@ private:
   /// The offset within a larger chunk of code
   int m_offset;
 };
-
-#endif /* SCRIPTCODE_H_ */
diff --git a/MantidPlot/src/ScriptFileInterpreter.h b/MantidPlot/src/ScriptFileInterpreter.h
index 419c18a53d2..b443ee9bf72 100644
--- a/MantidPlot/src/ScriptFileInterpreter.h
+++ b/MantidPlot/src/ScriptFileInterpreter.h
@@ -4,8 +4,7 @@
 //     NScD Oak Ridge National Laboratory, European Spallation Source
 //     & Institut Laue - Langevin
 // SPDX - License - Identifier: GPL - 3.0 +
-#ifndef SCRIPTFILEINTERPRETER_H_
-#define SCRIPTFILEINTERPRETER_H_
+#pragma once
 
 #include "Script.h"
 
@@ -255,5 +254,3 @@ private:
   QMessageBox *m_msgBox;
   ScriptFileInterpreter &m_interpreter;
 };
-
-#endif /* SCRIPTFILEINTERPRETER_H_ */
diff --git a/MantidPlot/src/ScriptOutputDisplay.h b/MantidPlot/src/ScriptOutputDisplay.h
index ae46f0b3030..667f85c32db 100644
--- a/MantidPlot/src/ScriptOutputDisplay.h
+++ b/MantidPlot/src/ScriptOutputDisplay.h
@@ -4,8 +4,7 @@
 //     NScD Oak Ridge National Laboratory, European Spallation Source
 //     & Institut Laue - Langevin
 // SPDX - License - Identifier: GPL - 3.0 +
-#ifndef SCRIPTOUTPUTDISPLAY_H_
-#define SCRIPTOUTPUTDISPLAY_H_
+#pragma once
 
 #include <QTextEdit>
 
@@ -92,5 +91,3 @@ private:
   /// current zoom level
   int m_zoomLevel;
 };
-
-#endif /* SCRIPTOUTPUTDISPLAY_H_ */
diff --git a/MantidPlot/src/Scripted.h b/MantidPlot/src/Scripted.h
index 4e33aa25472..b5b39cd2474 100644
--- a/MantidPlot/src/Scripted.h
+++ b/MantidPlot/src/Scripted.h
@@ -4,8 +4,7 @@
 //     NScD Oak Ridge National Laboratory, European Spallation Source
 //     & Institut Laue - Langevin
 // SPDX - License - Identifier: GPL - 3.0 +
-#ifndef SCRIPTED_H_
-#define SCRIPTED_H_
+#pragma once
 
 //------------------------------------------
 // Includes
@@ -55,5 +54,3 @@ private:
   /// A pointer to the current environment
   ScriptingEnv *m_scriptEnv;
 };
-
-#endif // SCRIPTED_H_
diff --git a/MantidPlot/src/ScriptingEnv.h b/MantidPlot/src/ScriptingEnv.h
index 5907c5f4c2a..513145c2172 100644
--- a/MantidPlot/src/ScriptingEnv.h
+++ b/MantidPlot/src/ScriptingEnv.h
@@ -28,8 +28,7 @@
  *   Boston, MA  02110-1301  USA                                           *
  *                                                                         *
  ***************************************************************************/
-#ifndef SCRIPTINGENV_H
-#define SCRIPTINGENV_H
+#pragma once
 
 #include "Script.h"
 
@@ -178,5 +177,3 @@ private:
   /// Available languages
   static ScriptingLang g_langs[];
 };
-
-#endif
diff --git a/MantidPlot/src/ScriptingLangDialog.h b/MantidPlot/src/ScriptingLangDialog.h
index 6e8b022fd65..1dc8dba2cdd 100644
--- a/MantidPlot/src/ScriptingLangDialog.h
+++ b/MantidPlot/src/ScriptingLangDialog.h
@@ -27,8 +27,7 @@
  *   Boston, MA  02110-1301  USA                                           *
  *                                                                         *
  ***************************************************************************/
-#ifndef SCRIPTING_LANG_DIALOG_H
-#define SCRIPTING_LANG_DIALOG_H
+#pragma once
 
 #include "Scripted.h"
 #include "ScriptingEnv.h"
@@ -54,5 +53,3 @@ private:
   QListWidget *langList;
   QPushButton *btnOK, *btnCancel;
 };
-
-#endif
diff --git a/MantidPlot/src/ScriptingWindow.h b/MantidPlot/src/ScriptingWindow.h
index d363c04ca08..f66d634d6ed 100644
--- a/MantidPlot/src/ScriptingWindow.h
+++ b/MantidPlot/src/ScriptingWindow.h
@@ -4,8 +4,7 @@
 //     NScD Oak Ridge National Laboratory, European Spallation Source
 //     & Institut Laue - Langevin
 // SPDX - License - Identifier: GPL - 3.0 +
-#ifndef SCRIPTINGWINDOW_H_
-#define SCRIPTINGWINDOW_H_
+#pragma once
 
 //----------------------------------
 // Includes
@@ -204,5 +203,3 @@ private:
 
   bool m_failureFlag{false};
 };
-
-#endif // SCRIPTINGWINDOW_H_
diff --git a/MantidPlot/src/SelectionMoveResizer.h b/MantidPlot/src/SelectionMoveResizer.h
index 4ba757d015a..ad621b94904 100644
--- a/MantidPlot/src/SelectionMoveResizer.h
+++ b/MantidPlot/src/SelectionMoveResizer.h
@@ -27,8 +27,7 @@
  *                                                                         *
  ***************************************************************************/
 
-#ifndef SELECTION_MOVE_RESIZER_H
-#define SELECTION_MOVE_RESIZER_H
+#pragma once
 
 #include <QList>
 #include <QRect>
@@ -250,5 +249,3 @@ private slots:
   void removeWidget(QObject *w);
   void removeLegend(QObject *w);
 };
-
-#endif // ifndef SELECTION_MOVE_RESIZER_H
diff --git a/MantidPlot/src/SendToProgramDialog.h b/MantidPlot/src/SendToProgramDialog.h
index 83206cd739a..20c1e43686d 100644
--- a/MantidPlot/src/SendToProgramDialog.h
+++ b/MantidPlot/src/SendToProgramDialog.h
@@ -4,8 +4,7 @@
 //     NScD Oak Ridge National Laboratory, European Spallation Source
 //     & Institut Laue - Langevin
 // SPDX - License - Identifier: GPL - 3.0 +
-#ifndef SendToProgramDialog_H
-#define SendToProgramDialog_H
+#pragma once
 
 #include "ui_SendToProgramDialog.h"
 #include <QDialog>
@@ -58,5 +57,3 @@ private:
   Ui::SendToProgramDialog m_uiform;
   std::pair<std::string, std::map<std::string, std::string>> m_settings;
 };
-
-#endif // SendToProgram_H
diff --git a/MantidPlot/src/SetColValuesDialog.h b/MantidPlot/src/SetColValuesDialog.h
index 7604a212662..9732f19ff59 100644
--- a/MantidPlot/src/SetColValuesDialog.h
+++ b/MantidPlot/src/SetColValuesDialog.h
@@ -29,8 +29,7 @@
  *   Boston, MA  02110-1301  USA                                           *
  *                                                                         *
  ***************************************************************************/
-#ifndef VALUESDIALOG_H
-#define VALUESDIALOG_H
+#pragma once
 
 #include "Scripted.h"
 #include "ScriptingEnv.h"
@@ -82,5 +81,3 @@ private:
   QSpinBox *start, *end;
   QLabel *colNameLabel;
 };
-
-#endif //
diff --git a/MantidPlot/src/SigmoidalFit.h b/MantidPlot/src/SigmoidalFit.h
index b3af242947e..4f277c310a6 100644
--- a/MantidPlot/src/SigmoidalFit.h
+++ b/MantidPlot/src/SigmoidalFit.h
@@ -15,8 +15,7 @@
  *   Boston, MA  02110-1301  USA                                           *
  *                                                                         *
  ***************************************************************************/
-#ifndef SIGMOIDALFIT_H
-#define SIGMOIDALFIT_H
+#pragma once
 
 #include "Fit.h"
 
@@ -44,5 +43,3 @@ private:
 
   bool d_logistic;
 };
-
-#endif
diff --git a/MantidPlot/src/SmoothCurveDialog.h b/MantidPlot/src/SmoothCurveDialog.h
index 2606f0836f4..644f417a1fa 100644
--- a/MantidPlot/src/SmoothCurveDialog.h
+++ b/MantidPlot/src/SmoothCurveDialog.h
@@ -27,8 +27,7 @@
  *   Boston, MA  02110-1301  USA                                           *
  *                                                                         *
  ***************************************************************************/
-#ifndef SMOOTHDIALOG_H
-#define SMOOTHDIALOG_H
+#pragma once
 
 #include <QDialog>
 
@@ -60,5 +59,3 @@ private:
   QSpinBox *boxPointsLeft, *boxPointsRight, *boxOrder;
   ColorBox *boxColor;
 };
-
-#endif
diff --git a/MantidPlot/src/SmoothFilter.h b/MantidPlot/src/SmoothFilter.h
index ef9912c6182..b559db1f999 100644
--- a/MantidPlot/src/SmoothFilter.h
+++ b/MantidPlot/src/SmoothFilter.h
@@ -15,8 +15,7 @@
  *   Boston, MA  02110-1301  USA                                           *
  *                                                                         *
  ***************************************************************************/
-#ifndef SMOOTHFILTER_H
-#define SMOOTHFILTER_H
+#pragma once
 
 #include "Filter.h"
 
@@ -60,5 +59,3 @@ private:
   // C for details).
   int d_polynom_order;
 };
-
-#endif
diff --git a/MantidPlot/src/SortDialog.h b/MantidPlot/src/SortDialog.h
index bc4f6dbcaaf..42ce2a3e622 100644
--- a/MantidPlot/src/SortDialog.h
+++ b/MantidPlot/src/SortDialog.h
@@ -27,8 +27,7 @@
  *   Boston, MA  02110-1301  USA                                           *
  *                                                                         *
  ***************************************************************************/
-#ifndef SORTDIALOG_H
-#define SORTDIALOG_H
+#pragma once
 
 #include <QDialog>
 
@@ -57,5 +56,3 @@ private:
   QComboBox *boxOrder;
   QComboBox *columnsList;
 };
-
-#endif
diff --git a/MantidPlot/src/Spectrogram.h b/MantidPlot/src/Spectrogram.h
index fee08702411..cb5cfb56f59 100644
--- a/MantidPlot/src/Spectrogram.h
+++ b/MantidPlot/src/Spectrogram.h
@@ -26,8 +26,7 @@
  *                                                                         *
  ***************************************************************************/
 
-#ifndef SPECTROGRAM_H
-#define SPECTROGRAM_H
+#pragma once
 
 #include "Matrix.h"
 #include "PlotCurve.h"
@@ -363,5 +362,3 @@ private:
   //! Min and max values in the source data matrix
   double min_z, max_z;
 };
-
-#endif
diff --git a/MantidPlot/src/SurfaceDialog.h b/MantidPlot/src/SurfaceDialog.h
index 8045a26c55a..9b01bde75bb 100644
--- a/MantidPlot/src/SurfaceDialog.h
+++ b/MantidPlot/src/SurfaceDialog.h
@@ -15,8 +15,7 @@
  *   Boston, MA  02110-1301  USA                                           *
  *                                                                         *
  ***************************************************************************/
-#ifndef SURFACEDIALOG_H
-#define SURFACEDIALOG_H
+#pragma once
 
 #include <QDialog>
 
@@ -78,5 +77,3 @@ private:
   QCheckBox *boxUPeriodic, *boxVPeriodic;
   QSpinBox *boxColumns, *boxRows, *boxFuncColumns, *boxFuncRows;
 };
-
-#endif
diff --git a/MantidPlot/src/Table.h b/MantidPlot/src/Table.h
index cebc085edd0..e81b3bc6795 100644
--- a/MantidPlot/src/Table.h
+++ b/MantidPlot/src/Table.h
@@ -29,8 +29,7 @@
  *   Boston, MA  02110-1301  USA                                           *
  *                                                                         *
  ***************************************************************************/
-#ifndef TABLE_H
-#define TABLE_H
+#pragma once
 
 #include <QTableWidget>
 #include <QVarLengthArray>
@@ -452,5 +451,3 @@ private:
   //! Internal function to change the column header
   void setColumnHeader(int index, const QString &label);
 };
-
-#endif
diff --git a/MantidPlot/src/TableDialog.h b/MantidPlot/src/TableDialog.h
index dfb489f1185..0ddef50ab45 100644
--- a/MantidPlot/src/TableDialog.h
+++ b/MantidPlot/src/TableDialog.h
@@ -27,8 +27,7 @@
  *   Boston, MA  02110-1301  USA                                           *
  *                                                                         *
  ***************************************************************************/
-#ifndef TABLEDIALOG_H
-#define TABLEDIALOG_H
+#pragma once
 
 #include "Table.h"
 
@@ -92,5 +91,3 @@ private:
   QTextEdit *comments;
   QCheckBox *boxShowTableComments, *boxReadOnly, *boxHideColumn;
 };
-
-#endif // TABLEDIALOG_H
diff --git a/MantidPlot/src/TableStatistics.h b/MantidPlot/src/TableStatistics.h
index b7e92bf002f..0877b0e7be6 100644
--- a/MantidPlot/src/TableStatistics.h
+++ b/MantidPlot/src/TableStatistics.h
@@ -27,8 +27,7 @@
  *   Boston, MA  02110-1301  USA                                           *
  *                                                                         *
  ***************************************************************************/
-#ifndef TABLE_STATISTICS_H
-#define TABLE_STATISTICS_H
+#pragma once
 
 #include "Table.h"
 
@@ -73,5 +72,3 @@ private:
   Type d_type;
   QList<int> d_targets;
 };
-
-#endif
diff --git a/MantidPlot/src/TextDialog.h b/MantidPlot/src/TextDialog.h
index 92e3ac77ec6..28b7fecf68e 100644
--- a/MantidPlot/src/TextDialog.h
+++ b/MantidPlot/src/TextDialog.h
@@ -27,8 +27,7 @@
  *                                                                         *
  ***************************************************************************/
 
-#ifndef TEXTDLG_H
-#define TEXTDLG_H
+#pragma once
 
 #include <QDialog>
 class QGroupBox;
@@ -119,5 +118,3 @@ protected:
   Graph *d_graph;
   QwtScaleWidget *d_scale;
 };
-
-#endif // TEXTDLG_H
diff --git a/MantidPlot/src/TextEditor.h b/MantidPlot/src/TextEditor.h
index 2cb705ad046..a7af8929624 100644
--- a/MantidPlot/src/TextEditor.h
+++ b/MantidPlot/src/TextEditor.h
@@ -16,8 +16,7 @@
  *                                                                         *
  ***************************************************************************/
 
-#ifndef TEXTEDITOR_H
-#define TEXTEDITOR_H
+#pragma once
 
 #include <QTextEdit>
 
@@ -41,5 +40,3 @@ private:
   QString d_initial_text;
   QWidget *d_target;
 };
-
-#endif
diff --git a/MantidPlot/src/TextFileIO.h b/MantidPlot/src/TextFileIO.h
index 4e894e925a2..86268b8fe04 100644
--- a/MantidPlot/src/TextFileIO.h
+++ b/MantidPlot/src/TextFileIO.h
@@ -4,8 +4,7 @@
 //     NScD Oak Ridge National Laboratory, European Spallation Source
 //     & Institut Laue - Langevin
 // SPDX - License - Identifier: GPL - 3.0 +
-#ifndef TEXTFILEIO_H_
-#define TEXTFILEIO_H_
+#pragma once
 
 #include <QString>
 #include <QStringList>
@@ -28,5 +27,3 @@ private:
 
   const QStringList m_filters;
 };
-
-#endif /* TEXTFILEIO_H_ */
diff --git a/MantidPlot/src/TiledWindow.h b/MantidPlot/src/TiledWindow.h
index 9cd6b8b221d..4b493cce504 100644
--- a/MantidPlot/src/TiledWindow.h
+++ b/MantidPlot/src/TiledWindow.h
@@ -4,8 +4,7 @@
 //     NScD Oak Ridge National Laboratory, European Spallation Source
 //     & Institut Laue - Langevin
 // SPDX - License - Identifier: GPL - 3.0 +
-#ifndef TiledWindow_H
-#define TiledWindow_H
+#pragma once
 
 #include "MdiSubWindow.h"
 
@@ -215,5 +214,3 @@ private:
   /// Accepts drops flag
   bool m_acceptDrop;
 };
-
-#endif // TiledWindow_H
diff --git a/MantidPlot/src/TranslateCurveTool.h b/MantidPlot/src/TranslateCurveTool.h
index ed2ca7261cf..7c835d0b635 100644
--- a/MantidPlot/src/TranslateCurveTool.h
+++ b/MantidPlot/src/TranslateCurveTool.h
@@ -28,8 +28,7 @@
  *   Boston, MA  02110-1301  USA                                           *
  *                                                                         *
  ***************************************************************************/
-#ifndef TRANSLATE_CURVE_TOOL_H
-#define TRANSLATE_CURVE_TOOL_H
+#pragma once
 
 #include "PlotToolInterface.h"
 #include <QObject>
@@ -84,5 +83,3 @@ private:
   QwtDoublePoint d_curve_point;
   ApplicationWindow *d_app;
 };
-
-#endif // TRANSLATE_CURVE_TOOL_H
diff --git a/MantidPlot/src/UserFunction.h b/MantidPlot/src/UserFunction.h
index 248fe481a53..15578d3945e 100644
--- a/MantidPlot/src/UserFunction.h
+++ b/MantidPlot/src/UserFunction.h
@@ -4,8 +4,7 @@
 //     NScD Oak Ridge National Laboratory, European Spallation Source
 //     & Institut Laue - Langevin
 // SPDX - License - Identifier: GPL - 3.0 +
-#ifndef USERFUNCTION_H
-#define USERFUNCTION_H
+#pragma once
 
 #include "MantidGeometry/Rendering/OpenGL_Headers.h"
 
@@ -74,5 +73,3 @@ public:
 private:
   QString d_formula;
 };
-
-#endif
diff --git a/MantidPlot/src/VectorCurve.h b/MantidPlot/src/VectorCurve.h
index 2541c8c3975..1fcd3f84771 100644
--- a/MantidPlot/src/VectorCurve.h
+++ b/MantidPlot/src/VectorCurve.h
@@ -27,8 +27,7 @@
  *   Boston, MA  02110-1301  USA                                           *
  *                                                                         *
  ***************************************************************************/
-#ifndef VECTORCURVE_H
-#define VECTORCURVE_H
+#pragma once
 
 #include "PlotCurve.h"
 #include <qwt_plot.h>
@@ -104,5 +103,3 @@ protected:
   QString d_end_x_a;
   QString d_end_y_m;
 };
-
-#endif
diff --git a/MantidPlot/src/WindowFactory.h b/MantidPlot/src/WindowFactory.h
index 74234cb3875..4d6c79c4a88 100644
--- a/MantidPlot/src/WindowFactory.h
+++ b/MantidPlot/src/WindowFactory.h
@@ -4,8 +4,7 @@
 //     NScD Oak Ridge National Laboratory, European Spallation Source
 //     & Institut Laue - Langevin
 // SPDX - License - Identifier: GPL - 3.0 +
-#ifndef WINDOWFACTORY_H
-#define WINDOWFACTORY_H
+#pragma once
 
 //----------------------------------------------------------------------
 // Includes
@@ -171,5 +170,3 @@ template class Mantid::Kernel::SingletonHolder<WindowFactoryImpl>;
 using WindowFactory = Mantid::Kernel::SingletonHolder<WindowFactoryImpl>;
 } // namespace API
 } // namespace Mantid
-
-#endif // WINDOWFACTORY_H
diff --git a/MantidPlot/src/analysis/fft2D.h b/MantidPlot/src/analysis/fft2D.h
index 82ff7be17db..953cc3c30bd 100644
--- a/MantidPlot/src/analysis/fft2D.h
+++ b/MantidPlot/src/analysis/fft2D.h
@@ -16,11 +16,8 @@
  *                                                                         *
  ***************************************************************************/
 
-#ifndef FOURIER_H
-#define FOURIER_H
+#pragma once
 
 void fft2d(double **xtre, double **xtim, int width, int height);
 void fft2d_inv(double **xtre, double **xtim, double **xrec_re, double **xrec_im,
                int width, int height);
-
-#endif
diff --git a/MantidPlot/src/customevents.h b/MantidPlot/src/customevents.h
index a47975cf655..08c2c56f769 100644
--- a/MantidPlot/src/customevents.h
+++ b/MantidPlot/src/customevents.h
@@ -34,9 +34,6 @@
  *                                                                         *
  ***************************************************************************/
 
-#ifndef CUSTOM_EVENTS_H
-#define CUSTOM_EVENTS_H
+#pragma once
 
 #define SCRIPTING_CHANGE_EVENT QEvent::User
-
-#endif
diff --git a/MantidPlot/src/fit_gsl.h b/MantidPlot/src/fit_gsl.h
index 8c2497a9d36..1d0d033116c 100644
--- a/MantidPlot/src/fit_gsl.h
+++ b/MantidPlot/src/fit_gsl.h
@@ -4,8 +4,7 @@
 //     NScD Oak Ridge National Laboratory, European Spallation Source
 //     & Institut Laue - Langevin
 // SPDX - License - Identifier: GPL - 3.0 +
-#ifndef FIT_GSL_H
-#define FIT_GSL_H
+#pragma once
 
 #include <cstddef>
 #include <gsl/gsl_matrix.h>
@@ -72,5 +71,3 @@ int user_f(const gsl_vector *x, void *params, gsl_vector *f);
 double user_d(const gsl_vector *x, void *params);
 int user_df(const gsl_vector *x, void *params, gsl_matrix *J);
 int user_fdf(const gsl_vector *x, void *params, gsl_vector *f, gsl_matrix *J);
-
-#endif
diff --git a/MantidPlot/src/globals.h b/MantidPlot/src/globals.h
index 0a6b9f2c681..11d9bfe9c64 100644
--- a/MantidPlot/src/globals.h
+++ b/MantidPlot/src/globals.h
@@ -1,5 +1,4 @@
-#ifndef GLOBALS_H
-#define GLOBALS_H
+#pragma once
 /***************************************************************************
     File                 : globals.h
     Project              : QtiPlot
@@ -42,5 +41,3 @@ extern const char *extra_version;
 extern const char *copyright_string;
 /// Release date as a string
 extern const char *release_date;
-
-#endif /* GLOBALS_H */
diff --git a/MantidPlot/src/importOPJ.h b/MantidPlot/src/importOPJ.h
index 56cd77e1d0f..b15975405b8 100644
--- a/MantidPlot/src/importOPJ.h
+++ b/MantidPlot/src/importOPJ.h
@@ -26,8 +26,7 @@
  *   Boston, MA  02110-1301  USA                                           *
  *                                                                         *
  ***************************************************************************/
-#ifndef IMPORTOPJ_H
-#define IMPORTOPJ_H
+#pragma once
 
 #include "ApplicationWindow.h"
 #include "origin/OPJFile.h"
@@ -57,5 +56,3 @@ private:
   int xoffset;
   ApplicationWindow *mw;
 };
-
-#endif // IMPORTOPJ_H
diff --git a/MantidPlot/src/lib/3rdparty/qtcolorpicker/src/qtcolorpicker.h b/MantidPlot/src/lib/3rdparty/qtcolorpicker/src/qtcolorpicker.h
index 5523a91edac..d584da008d8 100644
--- a/MantidPlot/src/lib/3rdparty/qtcolorpicker/src/qtcolorpicker.h
+++ b/MantidPlot/src/lib/3rdparty/qtcolorpicker/src/qtcolorpicker.h
@@ -44,8 +44,7 @@
 **
 ****************************************************************************/
 
-#ifndef QTCOLORPICKER_H
-#define QTCOLORPICKER_H
+#pragma once
 #include <QtCore/QString>
 #include <QtGui/QColor>
 #include <QtGui/QPushButton>
@@ -119,5 +118,3 @@ private:
   bool dirty;
   bool firstInserted;
 };
-
-#endif
diff --git a/MantidPlot/src/lib/include/CollapsiveGroupBox.h b/MantidPlot/src/lib/include/CollapsiveGroupBox.h
index 4de383d9e07..376dbcea725 100644
--- a/MantidPlot/src/lib/include/CollapsiveGroupBox.h
+++ b/MantidPlot/src/lib/include/CollapsiveGroupBox.h
@@ -16,8 +16,7 @@
  *                                                                         *
  ***************************************************************************/
 
-#ifndef COLLAPSIVE_GROUP_BOX__H
-#define COLLAPSIVE_GROUP_BOX__H
+#pragma once
 
 #include <QGroupBox>
 
@@ -38,5 +37,3 @@ public slots:
   void setCollapsed(bool collapsed = true);
   void setExpanded(bool expanded = true);
 };
-
-#endif
diff --git a/MantidPlot/src/lib/include/ColorBox.h b/MantidPlot/src/lib/include/ColorBox.h
index ace5304919a..15a104bbe5e 100644
--- a/MantidPlot/src/lib/include/ColorBox.h
+++ b/MantidPlot/src/lib/include/ColorBox.h
@@ -26,8 +26,7 @@
  *   Boston, MA  02110-1301  USA                                           *
  *                                                                         *
  ***************************************************************************/
-#ifndef COLORBOX_H
-#define COLORBOX_H
+#pragma once
 
 #include <QComboBox>
 
@@ -76,5 +75,3 @@ protected:
   //! Array containing the 24 predefined colors
   static const QColor colors[];
 };
-
-#endif
diff --git a/MantidPlot/src/lib/include/ColorButton.h b/MantidPlot/src/lib/include/ColorButton.h
index 59ca6531d8e..cc1d487460d 100644
--- a/MantidPlot/src/lib/include/ColorButton.h
+++ b/MantidPlot/src/lib/include/ColorButton.h
@@ -27,8 +27,7 @@
  *                                                                         *
  ***************************************************************************/
 
-#ifndef COLORBUTTON_H
-#define COLORBUTTON_H
+#pragma once
 
 #include <qtcolorpicker.h>
 
@@ -53,5 +52,3 @@ public:
 signals:
   void colorChanged();
 };
-
-#endif
diff --git a/MantidPlot/src/lib/include/ColorMapEditor.h b/MantidPlot/src/lib/include/ColorMapEditor.h
index f27bbdd85dd..0fc737286d9 100644
--- a/MantidPlot/src/lib/include/ColorMapEditor.h
+++ b/MantidPlot/src/lib/include/ColorMapEditor.h
@@ -25,8 +25,7 @@
  *   Boston, MA  02110-1301  USA                                           *
  *                                                                         *
  ***************************************************************************/
-#ifndef COLORMAPEDITOR_H
-#define COLORMAPEDITOR_H
+#pragma once
 
 #include <QLocale>
 #include <QWidget>
@@ -94,5 +93,3 @@ private:
   //! Precision used to display level values
   int d_precision;
 };
-
-#endif
diff --git a/MantidPlot/src/lib/include/ExtensibleFileDialog.h b/MantidPlot/src/lib/include/ExtensibleFileDialog.h
index 990aac8b8e1..0dcea4e15f3 100644
--- a/MantidPlot/src/lib/include/ExtensibleFileDialog.h
+++ b/MantidPlot/src/lib/include/ExtensibleFileDialog.h
@@ -26,8 +26,7 @@
  *   Boston, MA  02110-1301  USA                                           *
  *                                                                         *
  ***************************************************************************/
-#ifndef EXTENSIBLE_FILE_DIALOG_H
-#define EXTENSIBLE_FILE_DIALOG_H
+#pragma once
 
 #include <QFileDialog>
 #include <QPushButton>
@@ -87,5 +86,3 @@ private:
   //! The layout row (of the assumed QGridLayout) used for extensions
   int d_extension_row;
 };
-
-#endif // ifndef EXTENSIBLE_FILE_DIALOG_H
diff --git a/MantidPlot/src/lib/include/LineNumberDisplay.h b/MantidPlot/src/lib/include/LineNumberDisplay.h
index 8518fa7d4f4..6666f65095b 100644
--- a/MantidPlot/src/lib/include/LineNumberDisplay.h
+++ b/MantidPlot/src/lib/include/LineNumberDisplay.h
@@ -26,8 +26,7 @@
  *   Boston, MA  02110-1301  USA                                           *
  *                                                                         *
  ***************************************************************************/
-#ifndef LineNumberDisplay_H
-#define LineNumberDisplay_H
+#pragma once
 
 #include <QTextEdit>
 
@@ -57,5 +56,4 @@ private slots:
 private:
   void showEvent(QShowEvent *) override;
   QTextEdit *d_text_edit;
-};
-#endif
+};
\ No newline at end of file
diff --git a/MantidPlot/src/lib/include/PatternBox.h b/MantidPlot/src/lib/include/PatternBox.h
index 5db37d29498..17289bbeceb 100644
--- a/MantidPlot/src/lib/include/PatternBox.h
+++ b/MantidPlot/src/lib/include/PatternBox.h
@@ -26,8 +26,7 @@
  *   Boston, MA  02110-1301  USA                                           *
  *                                                                         *
  ***************************************************************************/
-#ifndef PATTERNBOX_H
-#define PATTERNBOX_H
+#pragma once
 
 #include <QComboBox>
 
@@ -57,5 +56,3 @@ private:
   static size_t numberOfPatterns();
   static const Qt::BrushStyle patterns[];
 };
-
-#endif
diff --git a/MantidPlot/src/lib/include/PenStyleBox.h b/MantidPlot/src/lib/include/PenStyleBox.h
index 2081347a770..5c28d72c150 100644
--- a/MantidPlot/src/lib/include/PenStyleBox.h
+++ b/MantidPlot/src/lib/include/PenStyleBox.h
@@ -15,8 +15,7 @@
  *   Boston, MA  02110-1301  USA                                           *
  *                                                                         *
  ***************************************************************************/
-#ifndef PEN_STYLE_BOX_H
-#define PEN_STYLE_BOX_H
+#pragma once
 
 #include <QComboBox>
 
@@ -43,5 +42,3 @@ private:
   static size_t numberOfPatterns();
   static const Qt::PenStyle patterns[];
 };
-
-#endif
diff --git a/MantidPlot/src/lib/include/SymbolBox.h b/MantidPlot/src/lib/include/SymbolBox.h
index 430bfa4f9ca..8f760a5b165 100644
--- a/MantidPlot/src/lib/include/SymbolBox.h
+++ b/MantidPlot/src/lib/include/SymbolBox.h
@@ -15,8 +15,7 @@
  *   Boston, MA  02110-1301  USA                                           *
  *                                                                         *
  ***************************************************************************/
-#ifndef SYMBOLBOX_H
-#define SYMBOLBOX_H
+#pragma once
 
 #include <QComboBox>
 #include <qwt_symbol.h>
@@ -55,5 +54,3 @@ private:
 
   static const QwtSymbol::Style symbols[];
 };
-
-#endif
diff --git a/MantidPlot/src/lib/include/SymbolDialog.h b/MantidPlot/src/lib/include/SymbolDialog.h
index c6af15dbe73..659cc9c3095 100644
--- a/MantidPlot/src/lib/include/SymbolDialog.h
+++ b/MantidPlot/src/lib/include/SymbolDialog.h
@@ -27,8 +27,7 @@
  *   Boston, MA  02110-1301  USA                                           *
  *                                                                         *
  ***************************************************************************/
-#ifndef SYMBOLDIALOG_H
-#define SYMBOLDIALOG_H
+#pragma once
 
 #include <QDialog>
 class QPushButton;
@@ -104,5 +103,3 @@ signals:
   //! Emitted when a letter is to be added
   void addLetter(const QString &);
 };
-
-#endif // exportDialog_H
diff --git a/MantidPlot/src/lib/include/TextFormatButtons.h b/MantidPlot/src/lib/include/TextFormatButtons.h
index 7cb4793d7a5..5c42cf2d7fc 100644
--- a/MantidPlot/src/lib/include/TextFormatButtons.h
+++ b/MantidPlot/src/lib/include/TextFormatButtons.h
@@ -29,8 +29,7 @@
  *                                                                         *
  ***************************************************************************/
 
-#ifndef TEXTFORMATBUTTONS_H
-#define TEXTFORMATBUTTONS_H
+#pragma once
 
 #include <QWidget>
 class QTextEdit;
@@ -91,5 +90,3 @@ private slots:
   //! Insert 'letter' into the text
   void addSymbol(const QString &letter);
 };
-
-#endif // TEXTFORMATBUTTONS_H
diff --git a/MantidPlot/src/muParserScript.h b/MantidPlot/src/muParserScript.h
index fbaec25f326..d653ffe254b 100644
--- a/MantidPlot/src/muParserScript.h
+++ b/MantidPlot/src/muParserScript.h
@@ -27,8 +27,7 @@
  *   Boston, MA  02110-1301  USA                                           *
  *                                                                         *
  ***************************************************************************/
-#ifndef MUPARSER_SCRIPT_H
-#define MUPARSER_SCRIPT_H
+#pragma once
 
 #include "Script.h"
 
@@ -100,5 +99,3 @@ private:
 public:
   static muParserScript *current;
 };
-
-#endif
diff --git a/MantidPlot/src/muParserScripting.h b/MantidPlot/src/muParserScripting.h
index 81f1769f3a4..a691944ed44 100644
--- a/MantidPlot/src/muParserScripting.h
+++ b/MantidPlot/src/muParserScripting.h
@@ -27,8 +27,7 @@
  *   Boston, MA  02110-1301  USA                                           *
  *                                                                         *
  ***************************************************************************/
-#ifndef MUPARSER_SCRIPTING_H
-#define MUPARSER_SCRIPTING_H
+#pragma once
 
 #include "Script.h"
 #include "ScriptingEnv.h"
@@ -116,5 +115,3 @@ class EmptySourceError : public mu::ParserError {
 public:
   EmptySourceError() {}
 };
-
-#endif
diff --git a/MantidPlot/src/nrutil.h b/MantidPlot/src/nrutil.h
index cebb684de56..824022bf631 100644
--- a/MantidPlot/src/nrutil.h
+++ b/MantidPlot/src/nrutil.h
@@ -4,8 +4,7 @@
 //     NScD Oak Ridge National Laboratory, European Spallation Source
 //     & Institut Laue - Langevin
 // SPDX - License - Identifier: GPL - 3.0 +
-#ifndef NRUTIL_H
-#define NRUTIL_H
+#pragma once
 
 #define NR_END 1
 #define FREE_ARG char *
@@ -27,5 +26,3 @@ void ludcmp(double **a, int n, int *indx, double *d);
 void savgol(double *c, int np, int nl, int nr, int ld, int m);
 
 void polint(double xa[], double ya[], int n, double x, double *y, double *dy);
-
-#endif // NRUTIL_H
diff --git a/MantidPlot/src/origin/OPJFile.h b/MantidPlot/src/origin/OPJFile.h
index 9ac38561374..7bbecb120a7 100644
--- a/MantidPlot/src/origin/OPJFile.h
+++ b/MantidPlot/src/origin/OPJFile.h
@@ -29,8 +29,7 @@
 
 /* Origin 7.5 column value display : see FORMAT */
 
-#ifndef OPJFILE_H
-#define OPJFILE_H
+#pragma once
 
 /* version 0.0 2007-09-26 */
 #define LIBORIGIN_VERSION 0x00070926
@@ -1037,5 +1036,3 @@ private:
   std::vector<note> NOTE;
   tree<projectNode> projectTree;
 };
-
-#endif // OPJFILE_H
diff --git a/MantidPlot/src/origin/tree.hh b/MantidPlot/src/origin/tree.hh
index c036254fb88..3158bf18691 100644
--- a/MantidPlot/src/origin/tree.hh
+++ b/MantidPlot/src/origin/tree.hh
@@ -25,8 +25,7 @@
 */
 
 
-#ifndef tree_hh_
-#define tree_hh_
+#pragma once
 
 #include <cassert>
 #include <memory>
@@ -2779,8 +2778,6 @@ typename tree<T, tree_node_allocator>::leaf_iterator& tree<T, tree_node_allocato
    return (*this);
    }
 
-#endif
-
 // Local variables:
 // default-tab-width: 3
 // End:
-- 
GitLab