Here are three patches:

1. Removal of static QStringListModel::instance() method, and utilize
MainTab private variable members.
  Reasons of this are:
    * Simplifying the code.
    * Performance, less dynamic objects.
    * Allows second instance of modified classes for future needs.


2. Small patch that adds/removes '#include <QStringListModel>' statement.

3. Put include guards and guard end comment to every header.

br, Boris..
From f4946791a7773252778367d5c9fff87ded90449e Mon Sep 17 00:00:00 2001
From: Boris Barbulovski <[email protected]>
Date: Tue, 11 Feb 2014 18:46:14 +0100
Subject: [PATCH 1/3] Migrate MainTab models(QStringListModel)

Migrate MainTab models
  from static xxxCompletioModel::instance()
  to private MainTab variable members.

Signed-off-by: Boris Barbulovski <[email protected]>
---
 qt-ui/completionmodels.cpp | 15 ---------------
 qt-ui/completionmodels.h   |  5 -----
 qt-ui/maintab.cpp          | 20 ++++++++++----------
 qt-ui/maintab.h            |  7 +++++++
 4 files changed, 17 insertions(+), 30 deletions(-)

diff --git a/qt-ui/completionmodels.cpp b/qt-ui/completionmodels.cpp
index 8ccab3f..b0a5db2 100644
--- a/qt-ui/completionmodels.cpp
+++ b/qt-ui/completionmodels.cpp
@@ -2,21 +2,6 @@
 #include "dive.h"
 #include "mainwindow.h"
 
-#define CREATE_SINGLETON(X) \
-X* X::instance() \
-{ \
-	static QScopedPointer<X> self(new X()); \
-	return self.data(); \
-}
-
-CREATE_SINGLETON(BuddyCompletionModel);
-CREATE_SINGLETON(DiveMasterCompletionModel);
-CREATE_SINGLETON(LocationCompletionModel);
-CREATE_SINGLETON(SuitCompletionModel);
-CREATE_SINGLETON(TagCompletionModel);
-
-#undef CREATE_SINGLETON
-
 #define CREATE_UPDATE_METHOD(Class, diveStructMember) \
 void Class::updateModel() \
 { \
diff --git a/qt-ui/completionmodels.h b/qt-ui/completionmodels.h
index 1461865..2ac9f17 100644
--- a/qt-ui/completionmodels.h
+++ b/qt-ui/completionmodels.h
@@ -6,35 +6,30 @@
 class BuddyCompletionModel : public QStringListModel {
 	Q_OBJECT
 public:
-	static BuddyCompletionModel* instance();
 	void updateModel();
 };
 
 class DiveMasterCompletionModel : public QStringListModel {
 	Q_OBJECT
 public:
-	static DiveMasterCompletionModel* instance();
 	void updateModel();
 };
 
 class LocationCompletionModel : public QStringListModel {
 	Q_OBJECT
 public:
-	static LocationCompletionModel* instance();
 	void updateModel();
 };
 
 class SuitCompletionModel : public QStringListModel {
 	Q_OBJECT
 public:
-	static SuitCompletionModel* instance();
 	void updateModel();
 };
 
 class TagCompletionModel : public QStringListModel {
 	Q_OBJECT
 public:
-	static TagCompletionModel* instance();
 	void updateModel();
 };
 
diff --git a/qt-ui/maintab.cpp b/qt-ui/maintab.cpp
index 0aa683d..bdaddb8 100644
--- a/qt-ui/maintab.cpp
+++ b/qt-ui/maintab.cpp
@@ -89,11 +89,11 @@ MainTab::MainTab(QWidget *parent) : QTabWidget(parent),
 	ui.weights->view()->setItemDelegateForColumn(WeightModel::TYPE, new WSInfoDelegate(this));
 	// disabled as this column is pointless outside the disabled planner
 	// ui.cylinders->view()->setColumnHidden(CylindersModel::DEPTH, true);
-	completers.buddy = new QCompleter(BuddyCompletionModel::instance(), ui.buddy);
-	completers.divemaster = new QCompleter(DiveMasterCompletionModel::instance(), ui.divemaster);
-	completers.location = new QCompleter(LocationCompletionModel::instance(), ui.location);
-	completers.suit = new QCompleter(SuitCompletionModel::instance(), ui.suit);
-	completers.tags = new QCompleter(TagCompletionModel::instance(), ui.tagWidget);
+	completers.buddy = new QCompleter(&buddyModel, ui.buddy);
+	completers.divemaster = new QCompleter(&diveMasterModel, ui.divemaster);
+	completers.location = new QCompleter(&locationModel, ui.location);
+	completers.suit = new QCompleter(&suitModel, ui.suit);
+	completers.tags = new QCompleter(&tagModel, ui.tagWidget);
 	completers.buddy->setCaseSensitivity(Qt::CaseInsensitive);
 	completers.divemaster->setCaseSensitivity(Qt::CaseInsensitive);
 	completers.location->setCaseSensitivity(Qt::CaseInsensitive);
@@ -563,11 +563,11 @@ void MainTab::addWeight_clicked()
 
 void MainTab::reload()
 {
-	SuitCompletionModel::instance()->updateModel();
-	BuddyCompletionModel::instance()->updateModel();
-	LocationCompletionModel::instance()->updateModel();
-	DiveMasterCompletionModel::instance()->updateModel();
-	TagCompletionModel::instance()->updateModel();
+	suitModel.updateModel();
+	buddyModel.updateModel();
+	locationModel.updateModel();
+	diveMasterModel.updateModel();
+	tagModel.updateModel();
 }
 
 void MainTab::acceptChanges()
diff --git a/qt-ui/maintab.h b/qt-ui/maintab.h
index c5afd2f..1edeeba 100644
--- a/qt-ui/maintab.h
+++ b/qt-ui/maintab.h
@@ -13,6 +13,7 @@
 
 #include "models.h"
 #include "ui_maintab.h"
+#include "completionmodels.h"
 
 class QCompleter;
 struct dive;
@@ -94,6 +95,12 @@ private:
 	QMap<dive*, NotesBackup> notesBackup;
 	EditMode editMode;
 
+	BuddyCompletionModel buddyModel;
+	DiveMasterCompletionModel diveMasterModel;
+	LocationCompletionModel locationModel;
+	SuitCompletionModel suitModel;
+	TagCompletionModel tagModel;
+
 	/* since the multi-edition of the equipment is fairly more
 	 * complex than a single item, because it involves a Qt
 	 * Model to edit things, we are copying the first selected
-- 
1.8.3.2

From d81b558f16d548dd754e53e9627ccc78a630a30f Mon Sep 17 00:00:00 2001
From: Boris Barbulovski <[email protected]>
Date: Tue, 11 Feb 2014 18:50:44 +0100
Subject: [PATCH 2/3] Update #include statement for QStringListModel

Signed-off-by: Boris Barbulovski <[email protected]>
---
 qt-ui/diveplanner.cpp            | 1 -
 qt-ui/diveplanner.h              | 1 -
 qt-ui/downloadfromdivecomputer.h | 2 +-
 qt-ui/modeldelegates.cpp         | 1 -
 qt-ui/models.cpp                 | 1 +
 5 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/qt-ui/diveplanner.cpp b/qt-ui/diveplanner.cpp
index d75e065..f5d14b9 100644
--- a/qt-ui/diveplanner.cpp
+++ b/qt-ui/diveplanner.cpp
@@ -16,7 +16,6 @@
 #include <QDebug>
 #include <QGraphicsSceneMouseEvent>
 #include <QMessageBox>
-#include <QStringListModel>
 #include <QListView>
 #include <QModelIndex>
 #include <QSettings>
diff --git a/qt-ui/diveplanner.h b/qt-ui/diveplanner.h
index 5ed5b05..3c81c86 100644
--- a/qt-ui/diveplanner.h
+++ b/qt-ui/diveplanner.h
@@ -10,7 +10,6 @@
 #include "dive.h"
 
 class QListView;
-class QStringListModel;
 class QModelIndex;
 
 class DivePlannerPointsModel : public QAbstractTableModel{
diff --git a/qt-ui/downloadfromdivecomputer.h b/qt-ui/downloadfromdivecomputer.h
index f18170f..c1c5aab 100644
--- a/qt-ui/downloadfromdivecomputer.h
+++ b/qt-ui/downloadfromdivecomputer.h
@@ -5,6 +5,7 @@
 #include <QThread>
 #include <QHash>
 #include <QMap>
+#include <QStringListModel>
 #include "../libdivecomputer.h"
 #include "ui_downloadfromdivecomputer.h"
 
@@ -19,7 +20,6 @@ private:
 	device_data_t *data;
 };
 
-class QStringListModel;
 class DownloadFromDCWidget : public QDialog{
 	Q_OBJECT
 public:
diff --git a/qt-ui/modeldelegates.cpp b/qt-ui/modeldelegates.cpp
index b934010..5e5bc93 100644
--- a/qt-ui/modeldelegates.cpp
+++ b/qt-ui/modeldelegates.cpp
@@ -16,7 +16,6 @@
 #include <QLineEdit>
 #include <QKeyEvent>
 #include <QAbstractItemView>
-#include <QStringListModel>
 #include <QApplication>
 
 QSize DiveListDelegate::sizeHint(const QStyleOptionViewItem& option, const QModelIndex& index) const
diff --git a/qt-ui/models.cpp b/qt-ui/models.cpp
index a149488..93bc446 100644
--- a/qt-ui/models.cpp
+++ b/qt-ui/models.cpp
@@ -23,6 +23,7 @@
 #include <QFont>
 #include <QIcon>
 #include <QMessageBox>
+#include <QStringListModel>
 
 QFont defaultModelFont()
 {
-- 
1.8.3.2

From b90428bc4a6e713d696f9631df49866b537e8800 Mon Sep 17 00:00:00 2001
From: Boris Barbulovski <[email protected]>
Date: Tue, 11 Feb 2014 19:14:46 +0100
Subject: [PATCH 3/3] Put include guard to every header

* ensure include guard to every header
* comment endif guard block

Signed-off-by: Boris Barbulovski <[email protected]>
---
 color.h                              | 6 +++---
 deco.h                               | 2 +-
 device.h                             | 6 +++---
 display.h                            | 2 +-
 dive.h                               | 2 +-
 divelist.h                           | 2 +-
 file.h                               | 2 +-
 flag.h                               | 4 +++-
 helpers.h                            | 6 +++---
 libdivecomputer.h                    | 2 +-
 planner.h                            | 2 +-
 pref.h                               | 2 +-
 profile.h                            | 2 +-
 qt-gui.h                             | 2 +-
 qt-ui/about.h                        | 2 +-
 qt-ui/completionmodels.h             | 2 +-
 qt-ui/divecomputermanagementdialog.h | 2 +-
 qt-ui/diveplanner.h                  | 2 +-
 qt-ui/downloadfromdivecomputer.h     | 2 +-
 qt-ui/exif.h                         | 6 +++---
 qt-ui/globe.h                        | 2 +-
 qt-ui/graphicsview-common.h          | 2 +-
 qt-ui/groupedlineedit.h              | 6 +++---
 qt-ui/kmessagewidget.h               | 2 +-
 qt-ui/maintab.h                      | 2 +-
 qt-ui/mainwindow.h                   | 2 +-
 qt-ui/modeldelegates.h               | 2 +-
 qt-ui/models.h                       | 2 +-
 qt-ui/preferences.h                  | 6 +++---
 qt-ui/printdialog.h                  | 2 +-
 qt-ui/printlayout.h                  | 2 +-
 qt-ui/printoptions.h                 | 2 +-
 qt-ui/profile/animationfunctions.h   | 2 +-
 qt-ui/profile/divecartesianaxis.h    | 2 +-
 qt-ui/profile/diveeventitem.h        | 2 +-
 qt-ui/profile/divelineitem.h         | 2 +-
 qt-ui/profile/divepixmapitem.h       | 2 +-
 qt-ui/profile/diveplotdatamodel.h    | 2 +-
 qt-ui/profile/diveprofileitem.h      | 2 +-
 qt-ui/profile/diverectitem.h         | 2 +-
 qt-ui/profile/divetextitem.h         | 2 +-
 qt-ui/profile/divetooltipitem.h      | 2 +-
 qt-ui/profile/profilewidget2.h       | 2 +-
 qt-ui/profilegraphics.h              | 2 +-
 qt-ui/simplewidgets.h                | 2 +-
 qt-ui/subsurfacewebservices.h        | 2 +-
 qt-ui/tableview.h                    | 2 +-
 qt-ui/tagwidget.h                    | 6 +++---
 sha1.h                               | 4 ++++
 statistics.h                         | 2 +-
 subsurface-icon.h                    | 4 +++-
 subsurfacestartup.h                  | 2 +-
 uemis.h                              | 2 +-
 webservice.h                         | 4 ++++
 54 files changed, 78 insertions(+), 66 deletions(-)

diff --git a/color.h b/color.h
index e8c1b1e..9c8d6bc 100644
--- a/color.h
+++ b/color.h
@@ -1,5 +1,5 @@
-#ifndef COLORS_H
-#define COLORS_H
+#ifndef COLOR_H
+#define COLOR_H
 
 /* The colors are named by picking the closest match
    from http://chir.ag/projects/name-that-color */
@@ -57,4 +57,4 @@
 // Magentas
 #define MEDIUMREDVIOLET1_HIGHER_TRANS QColor::fromRgbF( 0.7, 0.2, 0.7, 0.1 )
 
-#endif
+#endif // COLOR_H
diff --git a/deco.h b/deco.h
index 0fc6cc2..aa6d299 100644
--- a/deco.h
+++ b/deco.h
@@ -12,4 +12,4 @@ extern double buehlmann_N2_t_halflife[];
 }
 #endif
 
-#endif
+#endif // DECO_H
diff --git a/device.h b/device.h
index ad5dee6..d38237b 100644
--- a/device.h
+++ b/device.h
@@ -1,5 +1,5 @@
-#ifndef DEVICE_INFO_H
-#define DEVICE_INFO_H
+#ifndef DEVICE_H
+#define DEVICE_H
 
 #ifdef __cplusplus
 #include "dive.h"
@@ -15,4 +15,4 @@ extern void call_for_each_dc(void *f, void (*callback)(void *, const char *, uin
 }
 #endif
 
-#endif
+#endif // DEVICE_H
diff --git a/display.h b/display.h
index 196338b..5068027 100644
--- a/display.h
+++ b/display.h
@@ -69,4 +69,4 @@ extern const char *default_dive_computer_device;
 }
 #endif
 
-#endif
+#endif // DISPLAY_H
diff --git a/dive.h b/dive.h
index 625ea43..7d0aaae 100644
--- a/dive.h
+++ b/dive.h
@@ -823,4 +823,4 @@ extern fraction_t string_to_fraction(const char *str);
 
 #include "pref.h"
 
-#endif /* DIVE_H */
+#endif // DIVE_H
diff --git a/divelist.h b/divelist.h
index 9cac6f0..a2bf6a0 100644
--- a/divelist.h
+++ b/divelist.h
@@ -41,4 +41,4 @@ extern void dump_trip_list(void);
 }
 #endif
 
-#endif
+#endif // DIVELIST_H
diff --git a/file.h b/file.h
index 1e1e077..2e4d3eb 100644
--- a/file.h
+++ b/file.h
@@ -19,4 +19,4 @@ extern timestamp_t parse_date(const char *date);
 }
 #endif
 
-#endif
+#endif // FILE_H
diff --git a/flag.h b/flag.h
index d3bd594..6cadcec 100644
--- a/flag.h
+++ b/flag.h
@@ -1,4 +1,6 @@
 /* GdkPixbuf RGBA C-Source image dump 1-byte-run-length-encoded */
+#ifndef FLAG_H
+#define FLAG_H
 
 static const GdkPixdata flag_pixbuf = {
   0x47646b50, /* Pixbuf magic: 'GdkP' */
@@ -73,4 +75,4 @@ static const GdkPixdata flag_pixbuf = {
   "53>t44;'\226\377\377\377\0",
 };
 
-
+#endif // FLAG_H
diff --git a/helpers.h b/helpers.h
index f734385..de0d4ce 100644
--- a/helpers.h
+++ b/helpers.h
@@ -4,8 +4,8 @@
  * header file for random helper functions of Subsurface
  *
  */
-#ifndef HELPER_H
-#define HELPER_H
+#ifndef HELPERS_H
+#define HELPERS_H
 
 #include <QString>
 #include "dive.h"
@@ -42,4 +42,4 @@ extern DiveComputerList dcList;
 #else
 #define TITLE_OR_TEXT(_t,_m) _t, _m
 #endif
-#endif /* HELPER_H */
+#endif // HELPERS_H
diff --git a/libdivecomputer.h b/libdivecomputer.h
index 8285f5a..ec210d3 100644
--- a/libdivecomputer.h
+++ b/libdivecomputer.h
@@ -42,4 +42,4 @@ extern char *dumpfile_name;
 }
 #endif
 
-#endif
+#endif // LIBDIVECOMPUTER_H
diff --git a/planner.h b/planner.h
index 330d7df..8141860 100644
--- a/planner.h
+++ b/planner.h
@@ -24,4 +24,4 @@ extern double plangflow, plangfhigh;
 #ifdef __cplusplus
 }
 #endif
-#endif /* PLANNER_H */
+#endif // PLANNER_H
diff --git a/pref.h b/pref.h
index e3f0a54..4157435 100644
--- a/pref.h
+++ b/pref.h
@@ -66,4 +66,4 @@ extern void save_preferences(void);
 }
 #endif
 
-#endif /* PREF_H */
+#endif // PREF_H
diff --git a/profile.h b/profile.h
index 82d6d58..6e6e682 100644
--- a/profile.h
+++ b/profile.h
@@ -126,4 +126,4 @@ void setup_pp_limits(struct graphics_context *gc);
 #ifdef __cplusplus
 }
 #endif
-#endif
+#endif // PROFILE_H
diff --git a/qt-gui.h b/qt-gui.h
index 43a006a..80a2daf 100644
--- a/qt-gui.h
+++ b/qt-gui.h
@@ -7,4 +7,4 @@ void init_qt_ui(int *argcp, char ***argvp, char *errormessage);
 void run_ui(void);
 void exit_ui(void);
 
-#endif
+#endif // QT_GUI_H
diff --git a/qt-ui/about.h b/qt-ui/about.h
index 0a4c8dd..4ec7dd8 100644
--- a/qt-ui/about.h
+++ b/qt-ui/about.h
@@ -17,4 +17,4 @@ private:
 	Ui::SubsurfaceAbout ui;
 };
 
-#endif
+#endif // ABOUT_H
diff --git a/qt-ui/completionmodels.h b/qt-ui/completionmodels.h
index 2ac9f17..859b8c0 100644
--- a/qt-ui/completionmodels.h
+++ b/qt-ui/completionmodels.h
@@ -33,4 +33,4 @@ public:
 	void updateModel();
 };
 
-#endif
+#endif // COMPLETIONMODELS_H
diff --git a/qt-ui/divecomputermanagementdialog.h b/qt-ui/divecomputermanagementdialog.h
index 008e6ab..aba9804 100644
--- a/qt-ui/divecomputermanagementdialog.h
+++ b/qt-ui/divecomputermanagementdialog.h
@@ -25,4 +25,4 @@ private:
 	DiveComputerModel *model;
 };
 
-#endif
+#endif // DIVECOMPUTERMANAGEMENTDIALOG_H
diff --git a/qt-ui/diveplanner.h b/qt-ui/diveplanner.h
index 3c81c86..364d039 100644
--- a/qt-ui/diveplanner.h
+++ b/qt-ui/diveplanner.h
@@ -241,4 +241,4 @@ private:
 	Ui::DivePlanner ui;
 };
 
-#endif
+#endif // DIVEPLANNER_H
diff --git a/qt-ui/downloadfromdivecomputer.h b/qt-ui/downloadfromdivecomputer.h
index c1c5aab..65bc69d 100644
--- a/qt-ui/downloadfromdivecomputer.h
+++ b/qt-ui/downloadfromdivecomputer.h
@@ -78,4 +78,4 @@ public:
 
 };
 
-#endif
+#endif // DOWNLOADFROMDIVECOMPUTER_H
diff --git a/qt-ui/exif.h b/qt-ui/exif.h
index a05399f..a3e6706 100644
--- a/qt-ui/exif.h
+++ b/qt-ui/exif.h
@@ -49,8 +49,8 @@
    NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
    EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */
-#ifndef __EXIF_H
-#define __EXIF_H
+#ifndef EXIF_H
+#define EXIF_H
 
 #include <string>
 
@@ -140,4 +140,4 @@ class EXIFInfo {
 // EXIF header was found, but data was corrupted.
 #define PARSE_EXIF_ERROR_CORRUPT              1985
 
-#endif
+#endif // EXIF_H
diff --git a/qt-ui/globe.h b/qt-ui/globe.h
index e057895..dad3cf9 100644
--- a/qt-ui/globe.h
+++ b/qt-ui/globe.h
@@ -39,4 +39,4 @@ public slots:
 
 };
 
-#endif
+#endif // GLOBE_H
diff --git a/qt-ui/graphicsview-common.h b/qt-ui/graphicsview-common.h
index 5f9dd19..50fd006 100644
--- a/qt-ui/graphicsview-common.h
+++ b/qt-ui/graphicsview-common.h
@@ -43,4 +43,4 @@ struct text_render_options {
 };
 
 typedef text_render_options text_render_options_t;
-#endif
+#endif // GRAPHICSVIEW_COMMON_H
diff --git a/qt-ui/groupedlineedit.h b/qt-ui/groupedlineedit.h
index 6003573..d0b675e 100644
--- a/qt-ui/groupedlineedit.h
+++ b/qt-ui/groupedlineedit.h
@@ -27,8 +27,8 @@
  * Boston, MA 02110-1301, USA.
  */
 
-#ifndef __GROUPEDLINEEDIT_H__
-#define __GROUPEDLINEEDIT_H__
+#ifndef GROUPEDLINEEDIT_H
+#define GROUPEDLINEEDIT_H
 
 #include <QPlainTextEdit>
 #include <QStringList>
@@ -69,4 +69,4 @@ private:
 	struct Private;
 	Private *d;
 };
-#endif
+#endif // GROUPEDLINEEDIT_H
diff --git a/qt-ui/kmessagewidget.h b/qt-ui/kmessagewidget.h
index 88fb4ad..5484211 100644
--- a/qt-ui/kmessagewidget.h
+++ b/qt-ui/kmessagewidget.h
@@ -236,4 +236,4 @@ public:
 	int bestContentHeight() const;
 };
 
-#endif /* KMESSAGEWIDGET_H */
+#endif // KMESSAGEWIDGET_H
diff --git a/qt-ui/maintab.h b/qt-ui/maintab.h
index 1edeeba..a1e588f 100644
--- a/qt-ui/maintab.h
+++ b/qt-ui/maintab.h
@@ -114,4 +114,4 @@ private:
 	void updateGpsCoordinates(const struct dive *dive);
 };
 
-#endif
+#endif // MAINTAB_H
diff --git a/qt-ui/mainwindow.h b/qt-ui/mainwindow.h
index 2d91745..a1b6782 100644
--- a/qt-ui/mainwindow.h
+++ b/qt-ui/mainwindow.h
@@ -148,4 +148,4 @@ private:
 
 MainWindow *mainWindow();
 
-#endif
+#endif // MAINWINDOW_H
diff --git a/qt-ui/modeldelegates.h b/qt-ui/modeldelegates.h
index 72f75b0..a2ecf29 100644
--- a/qt-ui/modeldelegates.h
+++ b/qt-ui/modeldelegates.h
@@ -79,4 +79,4 @@ public:
 	void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const;
 };
 
-#endif
+#endif // MODELDELEGATES_H
diff --git a/qt-ui/models.h b/qt-ui/models.h
index 505d7dc..df99104 100644
--- a/qt-ui/models.h
+++ b/qt-ui/models.h
@@ -325,4 +325,4 @@ private:
 
 	QStringList languages;
 };
-#endif
+#endif // MODELS_H
diff --git a/qt-ui/preferences.h b/qt-ui/preferences.h
index d7cf775..fb3d1f0 100644
--- a/qt-ui/preferences.h
+++ b/qt-ui/preferences.h
@@ -1,5 +1,5 @@
-#ifndef PREFERENCES_DIALOG_H
-#define PREFERENCES_DIALOG_H
+#ifndef PREFERENCES_H
+#define PREFERENCES_H
 
 #include <QDialog>
 #include "../dive.h"
@@ -34,4 +34,4 @@ private:
 	struct preferences oldPrefs;
 };
 
-#endif
+#endif // PREFERENCES_H
diff --git a/qt-ui/printdialog.h b/qt-ui/printdialog.h
index ebaea84..44c2de6 100644
--- a/qt-ui/printdialog.h
+++ b/qt-ui/printdialog.h
@@ -29,4 +29,4 @@ private slots:
 	void onPaintRequested(QPrinter *);
 };
 
-#endif
+#endif // PRINTDIALOG_H
diff --git a/qt-ui/printlayout.h b/qt-ui/printlayout.h
index e55d23d..393bfc5 100644
--- a/qt-ui/printlayout.h
+++ b/qt-ui/printlayout.h
@@ -46,4 +46,4 @@ signals:
     void signalProgress(int);
 };
 
-#endif
+#endif // PRINTLAYOUT_H
diff --git a/qt-ui/printoptions.h b/qt-ui/printoptions.h
index 0f1e9e8..29fc61a 100644
--- a/qt-ui/printoptions.h
+++ b/qt-ui/printoptions.h
@@ -36,4 +36,4 @@ private slots:
 	void profileOnTopClicked(bool check);
 };
 
-#endif
+#endif // PRINTOPTIONS_H
diff --git a/qt-ui/profile/animationfunctions.h b/qt-ui/profile/animationfunctions.h
index 958e53c..7686530 100644
--- a/qt-ui/profile/animationfunctions.h
+++ b/qt-ui/profile/animationfunctions.h
@@ -13,4 +13,4 @@ namespace Animations{
 	void animDelete(QObject *obj);
 };
 
-#endif
\ No newline at end of file
+#endif // ANIMATIONFUNCTIONS_H
diff --git a/qt-ui/profile/divecartesianaxis.h b/qt-ui/profile/divecartesianaxis.h
index 753a3e4..fe34e3c 100644
--- a/qt-ui/profile/divecartesianaxis.h
+++ b/qt-ui/profile/divecartesianaxis.h
@@ -115,4 +115,4 @@ private:
 	qreal verticalSize;
 	qreal horizontalSize;
 };
-#endif
+#endif // DIVECARTESIANAXIS_H
diff --git a/qt-ui/profile/diveeventitem.h b/qt-ui/profile/diveeventitem.h
index d729daa..cd55f56 100644
--- a/qt-ui/profile/diveeventitem.h
+++ b/qt-ui/profile/diveeventitem.h
@@ -26,4 +26,4 @@ private:
 	struct event* internalEvent;
 };
 
-#endif
\ No newline at end of file
+#endif // DIVEEVENTITEM_H
diff --git a/qt-ui/profile/divelineitem.h b/qt-ui/profile/divelineitem.h
index 497f803..3643d6e 100644
--- a/qt-ui/profile/divelineitem.h
+++ b/qt-ui/profile/divelineitem.h
@@ -14,4 +14,4 @@ public:
 	void animateMoveTo(qreal x, qreal y);
 };
 
-#endif
\ No newline at end of file
+#endif // DIVELINEITEM_H
diff --git a/qt-ui/profile/divepixmapitem.h b/qt-ui/profile/divepixmapitem.h
index c520e40..855a0d2 100644
--- a/qt-ui/profile/divepixmapitem.h
+++ b/qt-ui/profile/divepixmapitem.h
@@ -14,4 +14,4 @@ public:
 	DivePixmapItem(QObject* parent = 0);
 };
 
-#endif
\ No newline at end of file
+#endif // DIVEPIXMAPITEM_H
diff --git a/qt-ui/profile/diveplotdatamodel.h b/qt-ui/profile/diveplotdatamodel.h
index 47ebe03..a706f77 100644
--- a/qt-ui/profile/diveplotdatamodel.h
+++ b/qt-ui/profile/diveplotdatamodel.h
@@ -34,4 +34,4 @@ private:
 	int diveId;
 };
 
-#endif
+#endif // DIVEPLOTDATAMODEL_H
diff --git a/qt-ui/profile/diveprofileitem.h b/qt-ui/profile/diveprofileitem.h
index b47cbd5..9b7cc3c 100644
--- a/qt-ui/profile/diveprofileitem.h
+++ b/qt-ui/profile/diveprofileitem.h
@@ -158,4 +158,4 @@ private:
 	QColor normalColor;
 	QColor alertColor;
 };
-#endif
+#endif // DIVEPROFILEITEM_H
diff --git a/qt-ui/profile/diverectitem.h b/qt-ui/profile/diverectitem.h
index a595a64..9216fe9 100644
--- a/qt-ui/profile/diverectitem.h
+++ b/qt-ui/profile/diverectitem.h
@@ -14,4 +14,4 @@ public:
 	DiveRectItem(QObject *parent = 0, QGraphicsItem *parentItem = 0);
 };
 
-#endif
\ No newline at end of file
+#endif // DIVERECTITEM_H
diff --git a/qt-ui/profile/divetextitem.h b/qt-ui/profile/divetextitem.h
index 774693c..f7a9591 100644
--- a/qt-ui/profile/divetextitem.h
+++ b/qt-ui/profile/divetextitem.h
@@ -29,4 +29,4 @@ private:
 	QBrush brush;
 };
 
-#endif
+#endif // DIVETEXTITEM_H
diff --git a/qt-ui/profile/divetooltipitem.h b/qt-ui/profile/divetooltipitem.h
index 8e9573e..860d793 100644
--- a/qt-ui/profile/divetooltipitem.h
+++ b/qt-ui/profile/divetooltipitem.h
@@ -58,4 +58,4 @@ private:
 	plot_info pInfo;
 };
 
-#endif
\ No newline at end of file
+#endif // DIVETOOLTIPITEM_H
diff --git a/qt-ui/profile/profilewidget2.h b/qt-ui/profile/profilewidget2.h
index 605d93f..f5546a2 100644
--- a/qt-ui/profile/profilewidget2.h
+++ b/qt-ui/profile/profilewidget2.h
@@ -101,4 +101,4 @@ private:
 	PartialPressureGasItem *po2GasItem;
 };
 
-#endif
+#endif // PROFILEWIDGET2_H
diff --git a/qt-ui/profilegraphics.h b/qt-ui/profilegraphics.h
index 9080141..42006bd 100644
--- a/qt-ui/profilegraphics.h
+++ b/qt-ui/profilegraphics.h
@@ -172,4 +172,4 @@ private:
 	enum Mode mode;
 };
 
-#endif
+#endif // PROFILEGRAPHICS_H
diff --git a/qt-ui/simplewidgets.h b/qt-ui/simplewidgets.h
index d17bac0..6cf5bcd 100644
--- a/qt-ui/simplewidgets.h
+++ b/qt-ui/simplewidgets.h
@@ -69,4 +69,4 @@ private:
 
 bool isGnome3Session();
 
-#endif
+#endif // SIMPLEWIDGETS_H
diff --git a/qt-ui/subsurfacewebservices.h b/qt-ui/subsurfacewebservices.h
index 400f408..4d1ec00 100644
--- a/qt-ui/subsurfacewebservices.h
+++ b/qt-ui/subsurfacewebservices.h
@@ -91,4 +91,4 @@ private:
 	bool uploadMode;
 };
 
-#endif
+#endif // SUBSURFACEWEBSERVICES_H
diff --git a/qt-ui/tableview.h b/qt-ui/tableview.h
index fc22425..f89a7b6 100644
--- a/qt-ui/tableview.h
+++ b/qt-ui/tableview.h
@@ -41,4 +41,4 @@ private:
 	QPushButton *plusBtn;
 };
 
-#endif
+#endif // TABLEVIEW_H
diff --git a/qt-ui/tagwidget.h b/qt-ui/tagwidget.h
index b69bbdc..5f8fb33 100644
--- a/qt-ui/tagwidget.h
+++ b/qt-ui/tagwidget.h
@@ -1,5 +1,5 @@
-#ifndef __TAGWIDGET_H
-#define __TAGWIDGET_H
+#ifndef TAGWIDGET_H
+#define TAGWIDGET_H
 
 #include "groupedlineedit.h"
 #include <QCompleter>
@@ -26,4 +26,4 @@ private:
 	QCompleter *m_completer;
 };
 
-#endif /* __TAGWIDGET_H */
+#endif // TAGWIDGET_H
diff --git a/sha1.h b/sha1.h
index b77454a..68470d4 100644
--- a/sha1.h
+++ b/sha1.h
@@ -5,6 +5,8 @@
  * This was initially based on the Mozilla SHA1 implementation, although
  * none of the original Mozilla code remains.
  */
+#ifndef SHA1_H
+#define SHA1_H
 
 typedef struct {
 	unsigned long long size;
@@ -31,3 +33,5 @@ static inline void SHA1(const void *dataIn, unsigned long len, unsigned char has
 	SHA1_Update(&ctx, dataIn, len);
 	SHA1_Final(hashout, &ctx);
 }
+
+#endif // SHA1_H
diff --git a/statistics.h b/statistics.h
index 5f6e306..3602742 100644
--- a/statistics.h
+++ b/statistics.h
@@ -51,4 +51,4 @@ extern void process_selected_dives(void);
 }
 #endif
 
-#endif
+#endif // STATISTICS_H
diff --git a/subsurface-icon.h b/subsurface-icon.h
index 0478f67..c47b4d1 100644
--- a/subsurface-icon.h
+++ b/subsurface-icon.h
@@ -1,4 +1,6 @@
 /* GdkPixbuf RGBA C-Source image dump 1-byte-run-length-encoded */
+#ifndef SUBSURFACE_ICON_H
+#define SUBSURFACE_ICON_H
 
 static const GdkPixdata subsurface_icon_pixbuf = {
   0x47646b50, /* Pixbuf magic: 'GdkP' */
@@ -5239,4 +5241,4 @@ static const GdkPixdata subsurface_icon_pixbuf = {
   "\316\377\323\332\317\377\233!H\211\0",
 };
 
-
+#endif // SUBSURFACE_ICON_H
diff --git a/subsurfacestartup.h b/subsurfacestartup.h
index b09556f..8eaaaa0 100644
--- a/subsurfacestartup.h
+++ b/subsurfacestartup.h
@@ -20,4 +20,4 @@ void parse_argument(const char *arg);
 }
 #endif
 
-#endif
+#endif // SUBSURFACESTARTUP_H
diff --git a/uemis.h b/uemis.h
index 66a2b91..2b9e5ef 100644
--- a/uemis.h
+++ b/uemis.h
@@ -49,4 +49,4 @@ typedef struct {
 }
 #endif
 
-#endif /* UEMIS_H */
+#endif // UEMIS_H
diff --git a/webservice.h b/webservice.h
index 739f105..052b8aa 100644
--- a/webservice.h
+++ b/webservice.h
@@ -1,3 +1,6 @@
+#ifndef WEBSERVICE_H
+#define WEBSERVICE_H
+
 #ifdef __cplusplus
 extern "C" {
 #endif
@@ -18,3 +21,4 @@ enum {
 #ifdef __cplusplus
 }
 #endif
+#endif // WEBSERVICE_H
-- 
1.8.3.2

_______________________________________________
subsurface mailing list
[email protected]
http://lists.hohndel.org/cgi-bin/mailman/listinfo/subsurface

Reply via email to