diff --git a/MantidPlot/src/ApplicationWindow.h b/MantidPlot/src/ApplicationWindow.h
index db0236aa8bd6cb84681b729c9dd6c6dd4eba30fc..0bc349a2f26071d732fd8fb884a755a10ed4ffb2 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 d407988641fbf8569ade5509a097c35305124d49..42a55fa68c78325652444f67b706ce0e2f91c348 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 ff628207aaacd83951cbadb2835946bf5af0934e..d247ba76570159944f0422160f9774c42431c848 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 53af5530799687bf19f60373e1db147ac6855b35..2c22a6e3db8e899ebada3fd6f071e38bf3945c94 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 d2a78267f6a38ddcca1094cb7b2b4ecd3a339fa7..dd99ccec56609993d0b606af4af8e66c16512a02 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 0a3b63f8c0a3d6ca1f8f8d999cc75037bfe13253..f8297f6ad1e737576307a354526ec5070c2ea83c 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 fd0a301413343af6e342facf1b8bbc8de5988ffb..55f8019398dbbf1c4c7ba68ce9610f23308cfef9 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 a923bb516caa59800b324a5177729a9aeb13e3b0..916b1a9d156f6f0e2fec4168c8d99182bed6eb40 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 c437673e9a1d8aa101857bf8f7809c7309035b67..3546b87837df6ab344a0ab02c19dc6d7587947e2 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 4d0742e4d49c49c9a3dac57910ca83cac50b99c3..669c79f9e914c9d65df70840e58e5f98436b81e2 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 8700c5b2c591d87669edbabbb1563931313310bb..b311142d6295f56c9c423e17a1ed9f8d09c40c8e 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 38d85225d199b62a15841ffd1d996da109464fab..2d5ce91371287f141f503302b853a0e307e32bf7 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 8541047b8c7e516b156ec981a92986eb86c7ab3e..d8ad311d38cb4ea189447e8162f9453434838529 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 42bb932d04c940471b09778b613a8143229417a3..3d15437c7c9b6e91d1bf41400296fb10e1a8a5fd 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 e9415042d72e1ab8855c1e939b27f6bbd568374e..90fb0c8a74ec07498243dc5d1552669b84651eef 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 1e85f9ba1f6d303ebada4291f59474f6a410a4bb..7952b11f8f8a4295df30f2cc8a9968a95aa55b72 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 8d60ce086c7394652de852a98837b00ef4710a8d..6eda33f67c26cb4b9263a6e7c9611830385dab12 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 03da260a4c86f676c8636e70b28f06fc0c886e5c..dc60ab2abdfd6102b61c8f859e2b42442c630161 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 8386ea1c3ca5a17b6c022dc608b3e462c0d6fb81..4f6e205d73dee121cb9833c31c161520155ff7de 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 51d575f25d9ada8623cd5c6ee02d0e83da489d5e..56d26caeb509d125244e0ccdb14c28f924c07608 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 a736a97e8807504c3591d8b9ec1d0d96bd85e348..84287351570a7fc6cce13848a036048683ab51f7 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 5480eceb36217a3b31b6a7037c95590567c5ac9b..8c3b04102aef8dda106cb7be411ec4d8fff45269 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 d889b723e50a77f6cfb61182de098f7af3314c86..c94d8ec405784a790944d9f02e4bb9f0b1adeb42 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 3fbf325e05a3f26d1b76b21fe7f6005efefb0b02..2d135b20e0d7a8978162101a99db31c505d7a568 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 17dd657cd419de1b7e4b2d194cf55cb1a856e67f..85381f9306e007f0aef1abffbe45eb933c499e82 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 01fb38037314e4d5e4d3205105049911c453ecd5..9e92aaa6980dd03da6dc318b00bd185ee7ef4fcc 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 907e35885d9ae15b9d6ea666e9d27a8260d249d7..8d4cf07b76a5880d8feffae56a7558601054115f 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 c49c1565f150c0ad8b40898fb783f08414a4d898..ab87f3d7c0ee1afcbd66cdb20e78fb7a89506a49 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 e36b3d4399664d75b8c02608a6cded0026c3a20a..da87c9004897fcea96bf2369eb90e235550ed88a 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 f1774c5b4d299f3e2e4e5fc24d1feb79ec5aec55..53a86644a516a41772da1680b055d32947558be2 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 5bd8fe7fa0fbbddb6cd5729f7ef80bff3f7b23da..5facf7821c3887e56fef1a0cdb98affde422b02d 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 a8fc4fcc1bc85ac9dcf6143ca33268cc781d222c..5d1c957c06b5a410591daf1cf7af99d8c744c78f 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 65c5f416c3915b75ccaa9177c4e253af334e1a21..56f38128f385866a95dee2c8f1e2d0908c263d6a 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 5c263bcb93118ec92ec651201496e8384ad81f8e..8ee73b04fce18e56a560159c8a877b04fda6e528 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 351e8af31055d61cfdafd52a6c70d7b3c50be41a..c8dca1bddfe25759fe3f30988215bd64143b736a 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 41fd1ce38895097cd34eaf83c31b1d47f52b890b..6e4bb863f8fd0f190823f9cf551125153f7aacea 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 ffdfdf594fafed9ccd7c9852899af7434a2dd54a..69389b2ff243042c766e6524eeced65c3f422dcf 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 160293e199c49eb74a78aa902513c806c0c25701..30d7f397b380f59eb1dd07ab48095ba2b3024718 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 2d8b317dceb680aafa59bb1f4882abc8a7c56501..cc9551d6bd56375c5c30fbb735fb351fe53606a7 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 fce498ef3bcec8443f40ad7d8ab79f0aa8f2d039..bd13b2f2b7a2ee43c1070dac5be2820b918f2339 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 a2c0290278edef4f7ed7d351ea92eb0be4d86dc5..75911a57b70c6799f0995ce3f598fa092395cb6f 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 0ab7ef59c4a4111d0437808fe65544b2f93725fb..a5936852a96fe0a455a9119cdaeaee884b31570b 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 146bd58cd7add05cf7d1a9321f807960e2c12b8e..20a4f0118ec8125374567673134cf7626d2d97e4 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 3f314594efd4f3c4bc8c900fd2ed95c973296a56..394d71b6fe47033084bc191e6f6d5c9e61fbee29 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 f961dda863a8058d969e3490625c95f3dc5dc0d5..cb767e331b6fcbc19d096c5bb6acbcfff379d26f 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 6dd9f926311bbcb0784a9eb1f43e16548c5b0288..9036ec6136ae6b8297cf7a8e823d5cb3aac65bdd 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 3ba6142383ebbd93c12bcb5dc88c8ab7c4fc9751..a4660c3e87f2ba2f4c467ea545d3be283bfa6be6 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 518113c80dddc4a3f73fe2b2e5306eda7a07dd9c..e26d727a6176041cf2a72988bdcfcd43eb1d39d6 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 fbb4a3c213a65d5e64b4b7149e8ac6a1a862b36a..9008dddd68f704f80dfa3411afe9d65ff1309aaf 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 2fdc2fb106848a50201102d1b91f592dffaf19dc..e9a636e6168aa9db2d0a3eba921e19a0b4e81f78 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 953d0399920da12ccc1af06c111681ad52b8b155..eb92769560ffded68072773917debb61986a912f 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 883538da1e4185a0f45d70be8af6b8d955972521..827f2e35fb8b0df41b1c5847c0f0cede85abd459 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 feae2b6ad3a633e275f940b5b8bfdcad36e5bb2a..7dde6b3a1f5bfb0707c8991ae569f01165cd35c0 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 2f821a206cd915aff982cbf44b8e9dac56ad8ea5..97a1f7f1376d1383925275ac113e81c759458f90 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 8cb256b0d516492fb63a965ec308e0ae1da04324..163ff3909f74311700b2fb428227f8f26b77da67 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 1f9d51bf94287b91ac87d2e1ea8e1a19356726ac..15ae52a164cc47754cb46c2862ad78845246b64c 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 04e6d80941747a40a1070319c6eed44783f248af..ba05b59b34db1d5fe7dcce7010c61f8606d5cacf 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 0026e65b50e75b063f0e4d3bb8b18a24a7d1056e..8d0ce7d6bd30a2b8ffbf8cfc9b9e1483dc40a995 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 612549cefa627004e5dfd79247672f9e4c2f14e9..c6b8e8cbf58f23bd0036fac0f53c793982914e6d 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 9d21e540d6ea24043bfaffa5b5b83d1202816fb1..9cd4808b962151a74a7ec34e497610e00c4e0275 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 1f24d4076b0b183375af57868c0c3bfff6ed69bc..58910fa4609757d91114a50035fb71126bcca9f2 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 06336a197fa9544e900f785428ef98f5c2a50ce0..fdcaca203996b97d9475f8bd45c4e7027634ba02 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 7679084bc04f7a871a9e7d57f2034b36f1dffe0f..5df8011788a9bcce2122db2736f321ea6b8b339d 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 65bf7a571b7a22455f31b90a4c421a1ca3ff20c9..5888b39d3dfe6f48a699ed3eab3bdd2aeb20df36 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 ece431eac51ad10e11d918e998714ccb3840cac6..f7d956076507894e5428b4563b833d7c1631fb81 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 04af30b98e2b454b2c520cfc7dea5c2ceebd671b..7fd33f1cbe00a187fb10869e6dd555f356de4cb7 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 cbc1e750f74138c17625802c79b41b8914d26043..1e3905d8970e1f83af3eba833a373465a6201098 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 ba63736d1adc726228e53281f80c6e222dca642d..eda1c1e92857edea24ec040b25b3190e5bb42802 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 4a9468c6d25ff5f4247165e97813bdf541407833..a3f59165bad261df948e14ff215227e220cdc0b5 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 23823dfc6624178108441c9a4d7ea04463759e89..395a567c8b89dcfd315b00359238cf0294513f6b 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 d3324a20aa95d19a74e35bf3973094f610ba8d68..72d0fab7b7c1c84c2d4c9524a6445cfc56054835 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 d3d1cbcd399492745bb272cdf40f829690861331..5cbf9ab54f508b16466bbd05cef7b401dd577e7f 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 0f463cc681b440e48dd9dde0edfd540b1fb9fc93..293bb7c06f130b1ad6427bf3dabfffdd5cce017d 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 c0eea03b48d96fc104972fefd2a3b16e8d905067..49baba1ba5b676efc1c00e3c04764013289774e2 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 0a5038c21ed661302cca78a164d368948518b3e0..8fe65045a4e78ab7a4cf37c7c89d7efc2ffc0b5d 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 23c4c4481d0f76d1649601f41966dd1cc264b849..95bfa0dc73aadc487ccbcfeb707f296b74f7edb2 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 df48373a547edab1fbb3c6bbee08be007e35c71e..dbd89ddd01ea11a51cac03e04bc6733760c860a6 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 d13ef7d37fb70b04274832aa1aa5127b7011ba4a..8372847e6feb6a0dc7ec2ab016356461c659ee45 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 a342a945b75e216e2cc4b1ffcc9d2c759e562ffe..0ec3ef14172e262ca61703f4e145830fa47da34a 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 4cc149942009a4d645876c7f337be807bc80cb19..c59c6da0f6ccf504e20e496d854cfadd5d54609b 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 8710122c29652743f742cc517d5a058d3f9cf718..e57e967306c717fb42f14dd30cd81836daa4dba2 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 f03a3d10fad8b198fc561c6a4b9b79043b960847..f09d553c02a7179892cd813bd995a04b7b9b314c 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 16a71b9eb404c87f0cf4dda631da185405c2e41e..0b78021ab26ad991bba74401e97cd90469103b6a 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 d98f9e78fab77435c13c2895259fb3cc5e89adea..8e1fa9ba8a13fb155da668537b6abf80d613cef0 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 6f9fe04232f969d2d285ebc60817f432af60e4d9..5937fa0eeeaee498a8b464ba3f65c2e66ad3bdc9 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 675d0c512d7bd738b1c4022ffa5a81f5f3927395..3b24b56db6dc627ec85d8a612e04375f63d61889 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 454fa9ad2ddd87b419ef2c57ec4ea37197bb5993..8935e81ca9573df4d0a7f38c443ec68e98be1b02 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 93f5ce9ddb631ecc8dfdfb70712c131368ccada8..8aa399e5628326d3bc7074e42da59f7bb71fec77 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 0ba708c2c4579b5111fd15746ea3b9f32856a2fc..640b442d484a3528bd0bc9b9d218703a68cb7fbc 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 8673e1399b3987094dcfe8b0198578e81149dc70..0d7c7d41ef7e454be6c514f99e858fb3e45e455d 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 23c56cc83dcfdef18977851ed4e7ac423edccf87..1dbdfd6fa3603e832ca83f78b479123e6bc7ef93 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 91f3b6f22bf60a436de524fff1d02aa534faee4e..ac41a9bafbe87b080fdd1ac1994feb600a1e7dcd 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 b193a1b3b70406aba547b05945c6606379f3794e..c6ce9a444b513ff112513d8652f8b5a5c9b3f859 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 2ef543d5ba2a1e5818ec2cfe5820102e9594180f..78d09c1a1b60a6897814bb949f3d87e5d21b15b2 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 5202c23ba8651ceacad0d3482a5ee538a6e7e634..5d15ee80410f97feb3227b32212e4bc06f63a87e 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 ff3ff8857a8360765b3cfe3a1b3f65177c9d3c9f..337b18de7f852ec5cce386ca9b548975a4faf240 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 8c856a61b4802ca24586fd3ab93479df1609beee..380c926b12be8c2a1ab8d02cfb7ba2a2090afe77 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 f0b0e9454c3fe3ebf90bf67d413e904977d932e3..25d70aa326d2d6aa9ca78d49f9b6b91a5676d80c 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 ca0dfc53b56455ed54101515a76b72d6a43d0f6d..7fdd7e1c9bc6712b22d467673e3977c7c2be3143 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 909589da6b6126a951e10626e6ef2d824f41da64..4db565ffb01dc94ba2e4ed9faa426d72d2616410 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 9edd14dc0b99946c798a35343af2720c8afea2a3..36b25ff9152ec357c1f8808fd4c18c21219bddff 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 e7e5e672fb9cbc210920b7ac9f5f4552b3d16919..87c7330c64179e098c9f247ac5a5fe675647d664 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 b5282a26ccb7a2ea5831137d99a0298a3ec53f3d..a33ddd27a7caf4f82b1c7f4660300f3eb7a3cd3b 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 cf209345845433d24df7a12160388b39f98b4410..ad453f12b188d91cd64b856fa7e5c5ce84cc576f 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 a9e0d9b909014fbb573fc389e8c8521afc0dcc13..36e2b321653266debbfc9e1d6cd69dde7663dafc 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 625e6d48f81790163af3ad6c7dcf6827c0ec86f2..23591f36231cb5cd4c1548126bd938333c3334b1 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 c57a57742e348c140601b85e8cea02c45b8a753d..710018f499ace818f19c2ba7da1ab5605aa5c637 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 89f92d41f20e72a63ecdcf4abc4528fec6231ac7..9d91ce503054375817d1ad095f76eff0a1246851 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 848aa75b19cb4304faad75aac7ea20536c9b9c04..5c0cd4b488ad658a5ab6acc166f26292e0cf00ef 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 b4ac064b838e48a01cd35c80f179ab22d6a1fbb7..d338954d35661a873d29b53a80eac6ccbb8d28b4 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 6f8a49131c0cdeb9821b33dad209b59d8e4a3e3f..926c146175fc14d7a5e010365c94bd863605ac6c 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 72efcddb1786a1c517016054589d620fa3854376..8ea784c51046b6e1ab47be8f3d9c38594fdb760d 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 8fe93985cf8765a1062fde00a0990849ac392523..99ed126b8f1b0fe0edf012c3026016f4b52f3bce 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 d4c6ea1b1bf80d2edfade2d13e680f3f30d3211d..33fa78063aef053e376d539b2b55916488e2976d 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 ad6ceeaa66f4462dc80f814f09d7911d40cc9e3d..beb8d8a62a29ea88227bb497153835efe78d6000 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 72655bb2fbeb101784aa579f023954ff6c78e497..77c59d975e2a6519aececa73389e0b5bab17be09 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 0ffa0e60cb64150efb04e7a485e94c368cab96dd..e7e69ff2ef4319d7aabcae886fa9eff355d05829 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 ad3c01dcfa8758ca1e86e66879f3b1fb4c54e335..23052730f41926971bad0f1a12cf2fab18586dc3 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 b2bf39b1d001418851ed0f414268e1eb4a7e74c5..148607e92d58efcd95e9f12022af1769b6207ae0 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 0b13c6293bcab4c9c38c2102b103337c648e477c..dbd7e78f6e310afc3904a1ff847b5d4d1c13c4c7 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 e945ad272f6962398e8112fcc45f782a819ad602..30dfb0d84f894f42025dd1ae001682e90c9b7d86 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 8d812a03351d855e5c7ca34392919245146faf1b..c8c2736146c0e3b1f5e9b2820bad24e217f9d217 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 c1af1ebb79ebb9d4d7c185df19278b8057e59d49..a28c45600c97dc2e8d24f0122585262b2afd138d 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 ecb09ab3c4fbba77caa2dc0ebe1fcc3d9c78d784..9e72180570662eaa9cd6e0319b966b98b7d1738e 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 08150456f8cb50070776c70b21cbbbe79823434f..50563910e651c1e3803d1f75280e7d8c7eba626c 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 3bf88f28a7086713e72ec9dffb3ea858b36bf7fe..4553c5bb08a68ae6029874c029937e2c7fda057b 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 6a6c63a7bf6bdd9fac2266ca6e2acc10e54edbc3..3fc779cc9d20cdf77a540903e92399140a3d0db9 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 377f30adb79d4188c0b46703b38b701be302b91d..ad01ab61fe3556e268c09d6c77aaef6dbbc06e5d 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 16e0708ff9482c0c398101cb552b6cab05f649d6..14f217f56dbf15b03fa1e6a96a2b19d1bee7f3ea 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 37ca679351feb794b402d8a0625348d4302495d0..61dd4c82171c43e43d8a68aaed1270055d36ec55 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 ce5e2b963bca3ac8fd36ad9638245ab246649949..f5a5871db4d075f91c669fd33a8d86778888c07b 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 fbb515b0a73b30f221d7237b741646efcb4732e8..5023de4238522b640ae6019cd538d213fd2de31b 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 892fdb536907e728766273f49df0d3da39d68fda..3107f771305894dd3beb90b69364c2284c48b715 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 046db134f8e6e6863f71e188ec01087356017d16..de66cbcfbb4cae6f4a5b3a5cf1e7cd74aa0db41d 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 cd41a66d0392e808674dd752b6fed3ea1579781b..3b0c07b32d78aeb51229301f5c365a3d2d526431 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 b63ed8bc83cda5c8cec865f04b871b54f9fe7b80..2307e1af7f3e77c8c7c2839feb3de008b04b2533 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 24648d0b41b33f63f651067ea48038544abc1084..b5d03318d488747dc4ca7484e0151775be9cfbd1 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 1d22655651013979f70bee55a2c55672d714e1cd..20b97063f98d413bc5ebb603db9156b4a4cb7157 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 d3710be8fa1813787c16c878953cc4c4a80cf57d..020edd138aac20632718098e0fdc5381a8fcf709 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 797694c119c6d0d94aaaced4ec817003646de25a..be530a9e7ad56ca9df33b77dc1b9f6c0df0aae64 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 3b1483013f8b8e3f4321e4f1eb2b33cce0e3a955..ad5fb449288eb93bd9d5adc5930d51f9e2e9fcc2 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 419c18a53d2623c4ae954adb916b205045a7199b..b443ee9bf72bba2f5b55c4039d1f7a890cf38a94 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 ae46f0b3030c2d325d3659555cbc6dd9e20be2a1..667f85c32db35e514e768d128f951cdd8ff255a2 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 4e33aa254721f0fa66bed0606a341cf1d8a1fd2f..b5b39cd2474c97e0a2cf0da31a875a9f96887902 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 5907c5f4c2a504910f60a2d5659c2a8df0ce2003..513145c21726964f6259eae92c181e7552ab18ee 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 6e8b022fd6595dd6d17f2f17f507d589d784c351..1dc8dba2cdd226d7b9b3e2b9c8af31b3a0400d82 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 d363c04ca0834068df496a14f1cabbf7b6bfadad..f66d634d6ed14ec60d7bdd49b2b7f2a0725324bc 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 4ba757d015ad370518418410cc5fecf4511d8ccf..ad621b9490473402746f08f7d2c70f4ac3f11339 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 83206cd739a70f2d39f89a8317a28c2981b1ac48..20c1e43686d586921db501fd4762e7750a3c42c1 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 7604a212662f50dcc6f6774b5720fb5fb56c4129..9732f19ff59d51fb3bf0d0a108865fbb0422c812 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 b3af242947e24a65ac455ead3e5c56ce76eaf457..4f277c310a69b8ed3165bdd4bbdb9cec9c4f3dff 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 2606f0836f4eb477bc4cddcdf98119344ba58280..644f417a1fa5b5b79e45cb9fa45442e5abf67d1f 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 ef9912c6182f9be73773d7b63880edf30043d5d4..b559db1f99953f18f930723a7b4003f0d61ae7cf 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 bc4f6dbcaafdf0ef7143b3496dd1d9b43032b6b8..42ce2a3e622898ec5b5f448e600d6dbc761e0422 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 fee08702411e0eca97c16d1c6491db9ccb58ed41..cb5cfb56f59c07512e061d68eeb4ed31b6b19f02 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 8045a26c55ae633b7416a64075e7da4c2e8bda68..9b01bde75bb5c414e82ebb22c58665fe55e3fc06 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 cebc085edd078646cc2edf11fb466bf44250b5f7..e81b3bc679523386b085e04de447c5ebce8fad66 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 dfb489f11850ce0a1a61dc5e4f3d9327fa2911d0..0ddef50ab45ff6dc0dad8591103afcd637d4a519 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 b7e92bf002fb94a43a5a14bc54df9da277a5eb9f..0877b0e7be658b632ed2654801f3c311a3a33151 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 92e3ac77ec6467a6349d58ec4cb0240370f7a15b..28b7fecf68ef6930781255f9e561f7ec689c2381 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 2cb705ad04640e015ee36486cdd95d846d0335c4..a7af8929624e969813fabf237a746ca1004866c8 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 4e894e925a2b77af60be5c43f996a82e3dc12c36..86268b8fe0420945db29798f0ca93ff5ae36c645 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 9cd6b8b221df24cef8470a52050351ddafb8d303..4b493cce5048379ca37c0aa02b3bd51560e1ae20 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 ed2ca7261cf5c84ba793e4cbab52564a53668d05..7c835d0b635840ef9edf1c96b03821143fd7df3b 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 248fe481a5315044807f1b46b81e255afd3c8d0d..15578d3945eaa78e4892b2c55be64f48e7f6c8f9 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 2541c8c39755ffd82a2080fcefe799eba36da6af..1fcd3f84771d6b0ea33e6f4ae45f7ba07f9193ea 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 74234cb38750dfe378857709eed867b3188bd67f..4d6c79c4a88a2440b8f0c5dc348da04b1d8560b1 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 82ff7be17db32e9ae9cfccc53944746f5c54a469..953cc3c30bd2c0757c7ed1593622870ef7710305 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 a47975cf655b02cfcd4e44b51dd1cb60cf28dad4..08c2c56f7697f6e90bacf100f5fa4e58813d5204 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 8c2497a9d362441614d9b192a4681b5074725d92..1d0d033116cf9ebd8892d3ab813e522653790536 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 0a6b9f2c681518ecb81606147ab70239416cf1f4..11d9bfe9c64511ac46179bf56c30345aecb8c2b5 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 56cd77e1d0f7cd45ca5e303fc2b8124e4911f1ba..b15975405b866204d0d4e55fc06df9e263a28c0d 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 5523a91edac895fff38b70aca692a2d153f0a2c2..d584da008d8ab3661c12bb4e40d0766b2d879906 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 4de383d9e07eb23c91c38296c416ecfb33f8666a..376dbcea725a66b7fc1f35040a094ed72565f880 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 ace5304919a329836b00aa26fc35b5f970e2bbc8..15a104bbe5e866ddeb169d147bbf2e5141bb1567 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 59ca6531d8e88a1daf075989f446be4bbd577f2e..cc1d487460de6bda2b7e85a508eec3094221005e 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 f27bbdd85dde3b3b2207717e6e1397fbf5a8690d..0fc737286d92ef9afe89f1d56abd2c32740780d4 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 990aac8b8e1c6b3d3e0c98812043b5814df74cf1..0dcea4e15f3a39760105d384de8d5ed30120a8fc 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 8518fa7d4f42adde62c308cadeaee13d1e95bfd5..6666f65095bca0debd9087b6e18230c5b6c41e54 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 5db37d29498f870ab6c0a4cd31b7750328ba8bc5..17289bbeceb778e089a64e9f314ffbb21a009cb8 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 2081347a7700ac765fa6fa0f9c8bf471ff386a52..5c28d72c150838b8126aae9c4c0f398c1e9e00c8 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 430bfa4f9cad19632dda40162526370dca1f8998..8f760a5b1659430e2a998358789390267ab6a904 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 c6af15dbe731bc07f7b61e4471f6a2432b69b2a6..659cc9c3095aeaa400e0d0838cb9febfcaf8218a 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 7cb4793d7a5cb3625882bb33026ce66a75092aeb..5c42cf2d7fc588387d752f88b7f8c4af9f5850de 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 fbaec25f3261cc39fe202dfcf77d7abab9f5ee62..d653ffe254b03f46475b46ea2e5070bae2b7daf6 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 81f1769f3a4e42b9cb783a4833da5605626f3fe1..a691944ed44f8500598a88ddd7bd7c3520dfcab6 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 cebb684de5622afba45dc1e5ef060bd9ea548203..824022bf63128050f8ef488b39b5cc7b73f6f92b 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 9ac38561374456646840f21a7270cfe91d184556..7bbecb120a7b7ed3c88ed669759074e9f7b47644 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 c036254fb88100cfc64e741de9d0e9d476ce294f..3158bf18691fc9716ba1677d2fa3ecd67048bb4b 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: