diff options
author | hjk <hjk@theqtcompany.com> | 2016-03-18 07:55:01 +0100 |
---|---|---|
committer | hjk <hjk@theqtcompany.com> | 2016-03-30 15:20:19 +0000 |
commit | 39a38d5679084b515276285c044d8a27e671adb1 (patch) | |
tree | 8f72b00aa4a7db53eb8e193119033edf1ae9b0e4 /src/shared | |
parent | 6b805c217273b9d169aa7e8a78949e17179016bf (diff) |
Wholesale conversion to #pragma once
Kudos to cgmb and https://github.com/cgmb/guardonce
Change-Id: Ifa8970734b8d43fd08c9260c645bdb0228633791
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
Diffstat (limited to 'src/shared')
25 files changed, 25 insertions, 103 deletions
diff --git a/src/shared/cpaster/cgi.h b/src/shared/cpaster/cgi.h index 0422468e6c..688ec50288 100644 --- a/src/shared/cpaster/cgi.h +++ b/src/shared/cpaster/cgi.h @@ -23,8 +23,7 @@ ** ****************************************************************************/ -#ifndef CGI_H -#define CGI_H +#pragma once #include <QString> @@ -47,5 +46,3 @@ private: inline short charToHex(const QChar &ch); inline QChar hexToChar(const QString &hx); }; - -#endif // CGI_H diff --git a/src/shared/cpaster/splitter.h b/src/shared/cpaster/splitter.h index a4d14bbbc9..ae03a19514 100644 --- a/src/shared/cpaster/splitter.h +++ b/src/shared/cpaster/splitter.h @@ -23,8 +23,7 @@ ** ****************************************************************************/ -#ifndef SPLITTER_H -#define SPLITTER_H +#pragma once #include <QByteArray> #include <QList> @@ -42,5 +41,3 @@ struct FileData typedef QList<FileData> FileDataList; FileDataList splitDiffToFiles(const QString &data); - -#endif // SPLITTER_H diff --git a/src/shared/designerintegrationv2/formresizer.h b/src/shared/designerintegrationv2/formresizer.h index 80dbf0e1a0..aad1a57b0f 100644 --- a/src/shared/designerintegrationv2/formresizer.h +++ b/src/shared/designerintegrationv2/formresizer.h @@ -23,8 +23,7 @@ ** ****************************************************************************/ -#ifndef FORMRESIZER_H -#define FORMRESIZER_H +#pragma once #include "widgethostconstants.h" @@ -90,5 +89,3 @@ private: } } // namespace SharedTools - -#endif // FORMRESIZER_H diff --git a/src/shared/designerintegrationv2/sizehandlerect.h b/src/shared/designerintegrationv2/sizehandlerect.h index 36ebb4c579..df4912abe5 100644 --- a/src/shared/designerintegrationv2/sizehandlerect.h +++ b/src/shared/designerintegrationv2/sizehandlerect.h @@ -23,8 +23,7 @@ ** ****************************************************************************/ -#ifndef SIZEHANDLERECT_H -#define SIZEHANDLERECT_H +#pragma once #include "widgethostconstants.h" @@ -71,7 +70,3 @@ private: } } // namespace SharedTools - - -#endif // SIZEHANDLERECT_H - diff --git a/src/shared/designerintegrationv2/widgethost.h b/src/shared/designerintegrationv2/widgethost.h index 00f3ab6b30..ccf8590e91 100644 --- a/src/shared/designerintegrationv2/widgethost.h +++ b/src/shared/designerintegrationv2/widgethost.h @@ -23,8 +23,7 @@ ** ****************************************************************************/ -#ifndef WIDGETHOST_H -#define WIDGETHOST_H +#pragma once #include <QScrollArea> @@ -67,5 +66,3 @@ private: }; } // namespace SharedTools - -#endif // WIDGETHOST_H diff --git a/src/shared/designerintegrationv2/widgethostconstants.h b/src/shared/designerintegrationv2/widgethostconstants.h index f05b0c3598..76bbb3950b 100644 --- a/src/shared/designerintegrationv2/widgethostconstants.h +++ b/src/shared/designerintegrationv2/widgethostconstants.h @@ -23,8 +23,7 @@ ** ****************************************************************************/ -#ifndef WIDGETHOST_CONSTANTS_H -#define WIDGETHOST_CONSTANTS_H +#pragma once namespace SharedTools { namespace Internal { @@ -32,6 +31,3 @@ namespace SharedTools { enum SelectionHandleState { SelectionHandleOff, SelectionHandleInactive, SelectionHandleActive }; } } - -#endif // WIDGETHOST_CONSTANTS_H - diff --git a/src/shared/help/bookmarkmanager.h b/src/shared/help/bookmarkmanager.h index 7bb4c71e7f..2526d8bc43 100644 --- a/src/shared/help/bookmarkmanager.h +++ b/src/shared/help/bookmarkmanager.h @@ -23,8 +23,7 @@ ** ****************************************************************************/ -#ifndef BOOKMARKMANAGER_H -#define BOOKMARKMANAGER_H +#pragma once #include "ui_bookmarkdialog.h" @@ -188,5 +187,3 @@ private: BookmarkModel *listModel; QStandardItem *renameItem; }; - -#endif diff --git a/src/shared/help/contentwindow.h b/src/shared/help/contentwindow.h index 345769b258..99ec3cbca5 100644 --- a/src/shared/help/contentwindow.h +++ b/src/shared/help/contentwindow.h @@ -23,8 +23,7 @@ ** ****************************************************************************/ -#ifndef CONTENTWINDOW_H -#define CONTENTWINDOW_H +#pragma once #include <QUrl> #include <QModelIndex> @@ -66,5 +65,3 @@ private: int m_expandDepth; bool m_isOpenInNewPageActionVisible; }; - -#endif // CONTENTWINDOW_H diff --git a/src/shared/help/filternamedialog.h b/src/shared/help/filternamedialog.h index a32df1c8f7..23f62e9528 100644 --- a/src/shared/help/filternamedialog.h +++ b/src/shared/help/filternamedialog.h @@ -23,8 +23,7 @@ ** ****************************************************************************/ -#ifndef FILTERNAMEDIALOG_H -#define FILTERNAMEDIALOG_H +#pragma once #include <QDialog> #include "ui_filternamedialog.h" @@ -43,5 +42,3 @@ private slots: private: Ui::FilterNameDialogClass m_ui; }; - -#endif // FILTERNAMEDIALOG_H diff --git a/src/shared/help/helpicons.h b/src/shared/help/helpicons.h index af55edb552..cc9ea64df1 100644 --- a/src/shared/help/helpicons.h +++ b/src/shared/help/helpicons.h @@ -23,8 +23,7 @@ ** ****************************************************************************/ -#ifndef HELPICONS_H -#define HELPICONS_H +#pragma once #include <utils/icon.h> @@ -44,5 +43,3 @@ const Utils::Icon MODE_HELP_FLAT_ACTIVE({ } // namespace Icons } // namespace Help - -#endif // HELPICONS_H diff --git a/src/shared/help/indexwindow.h b/src/shared/help/indexwindow.h index 14a0983124..d041ba399f 100644 --- a/src/shared/help/indexwindow.h +++ b/src/shared/help/indexwindow.h @@ -23,8 +23,7 @@ ** ****************************************************************************/ -#ifndef INDEXWINDOW_H -#define INDEXWINDOW_H +#pragma once #include <QAbstractProxyModel> #include <QList> @@ -108,5 +107,3 @@ private: } // Internal } // Help - -#endif // INDEXWINDOW_H diff --git a/src/shared/help/topicchooser.h b/src/shared/help/topicchooser.h index 304551412a..a886b2b929 100644 --- a/src/shared/help/topicchooser.h +++ b/src/shared/help/topicchooser.h @@ -23,8 +23,7 @@ ** ****************************************************************************/ -#ifndef TOPICCHOOSER_H -#define TOPICCHOOSER_H +#pragma once #include "ui_topicchooser.h" @@ -62,5 +61,3 @@ private: QModelIndex m_activedIndex; QSortFilterProxyModel *m_filterModel; }; - -#endif // TOPICCHOOSER_H diff --git a/src/shared/modeltest/modeltest.h b/src/shared/modeltest/modeltest.h index ecebfeae00..e3f3c8aa34 100644 --- a/src/shared/modeltest/modeltest.h +++ b/src/shared/modeltest/modeltest.h @@ -23,8 +23,7 @@ ** ****************************************************************************/ -#ifndef MODELTEST_H -#define MODELTEST_H +#pragma once #include <QAbstractItemModel> #include <QObject> @@ -74,5 +73,3 @@ private: QList<QPersistentModelIndex> changing; }; - -#endif // MODELTEST_H diff --git a/src/shared/proparser/ioutils.h b/src/shared/proparser/ioutils.h index 3bade494df..f4fd79f32d 100644 --- a/src/shared/proparser/ioutils.h +++ b/src/shared/proparser/ioutils.h @@ -23,8 +23,7 @@ ** ****************************************************************************/ -#ifndef IOUTILS_H -#define IOUTILS_H +#pragma once #include <qstring.h> @@ -64,5 +63,3 @@ public: } // namespace ProFileEvaluatorInternal QT_END_NAMESPACE - -#endif // IOUTILS_H diff --git a/src/shared/proparser/profileevaluator.h b/src/shared/proparser/profileevaluator.h index f49097e670..27b26081b0 100644 --- a/src/shared/proparser/profileevaluator.h +++ b/src/shared/proparser/profileevaluator.h @@ -23,8 +23,7 @@ ** ****************************************************************************/ -#ifndef PROFILEEVALUATOR_H -#define PROFILEEVALUATOR_H +#pragma once #include "qmake_global.h" #include "qmakeglobals.h" @@ -96,5 +95,3 @@ private: }; QT_END_NAMESPACE - -#endif // PROFILEEVALUATOR_H diff --git a/src/shared/proparser/proitems.h b/src/shared/proparser/proitems.h index 4515eafc7b..d6bc4fe1cb 100644 --- a/src/shared/proparser/proitems.h +++ b/src/shared/proparser/proitems.h @@ -23,8 +23,7 @@ ** ****************************************************************************/ -#ifndef PROITEMS_H -#define PROITEMS_H +#pragma once #include "qmake_global.h" @@ -387,5 +386,3 @@ struct ProFunctionDefs { }; QT_END_NAMESPACE - -#endif // PROITEMS_H diff --git a/src/shared/proparser/prowriter.h b/src/shared/proparser/prowriter.h index cd100ffc98..808884837b 100644 --- a/src/shared/proparser/prowriter.h +++ b/src/shared/proparser/prowriter.h @@ -23,8 +23,7 @@ ** ****************************************************************************/ -#ifndef PROWRITER_H -#define PROWRITER_H +#pragma once #include "qmake_global.h" #include <QStringList> @@ -70,5 +69,3 @@ Q_DECLARE_OPERATORS_FOR_FLAGS(ProWriter::PutFlags) } // namespace Internal } // namespace QmakeProjectManager - -#endif // PROWRITER_H diff --git a/src/shared/proparser/qmake_global.h b/src/shared/proparser/qmake_global.h index af422118b6..8dd3844309 100644 --- a/src/shared/proparser/qmake_global.h +++ b/src/shared/proparser/qmake_global.h @@ -23,8 +23,7 @@ ** ****************************************************************************/ -#ifndef QMAKE_GLOBAL_H -#define QMAKE_GLOBAL_H +#pragma once #include <qglobal.h> @@ -51,5 +50,3 @@ #ifdef PROEVALUATOR_FULL # define PROEVALUATOR_DEBUG #endif - -#endif diff --git a/src/shared/proparser/qmakeevaluator.h b/src/shared/proparser/qmakeevaluator.h index 9394686283..7bb673cb89 100644 --- a/src/shared/proparser/qmakeevaluator.h +++ b/src/shared/proparser/qmakeevaluator.h @@ -23,8 +23,7 @@ ** ****************************************************************************/ -#ifndef QMAKEEVALUATOR_H -#define QMAKEEVALUATOR_H +#pragma once #if defined(PROEVALUATOR_FULL) && defined(PROEVALUATOR_THREAD_SAFE) # error PROEVALUATOR_FULL is incompatible with PROEVALUATOR_THREAD_SAFE due to cache() implementation @@ -310,5 +309,3 @@ Q_DECLARE_TYPEINFO(QMakeEvaluator::Location, Q_PRIMITIVE_TYPE); Q_DECLARE_OPERATORS_FOR_FLAGS(QMakeEvaluator::LoadFlags) QT_END_NAMESPACE - -#endif // QMAKEEVALUATOR_H diff --git a/src/shared/proparser/qmakeevaluator_p.h b/src/shared/proparser/qmakeevaluator_p.h index 66f6f138df..91c3922106 100644 --- a/src/shared/proparser/qmakeevaluator_p.h +++ b/src/shared/proparser/qmakeevaluator_p.h @@ -23,8 +23,7 @@ ** ****************************************************************************/ -#ifndef QMAKEEVALUATOR_P_H -#define QMAKEEVALUATOR_P_H +#pragma once #include "proitems.h" @@ -90,5 +89,3 @@ extern QMakeStatics statics; } QT_END_NAMESPACE - -#endif // QMAKEEVALUATOR_P_H diff --git a/src/shared/proparser/qmakeglobals.h b/src/shared/proparser/qmakeglobals.h index bd6fe2ead3..33a5bdb831 100644 --- a/src/shared/proparser/qmakeglobals.h +++ b/src/shared/proparser/qmakeglobals.h @@ -23,8 +23,7 @@ ** ****************************************************************************/ -#ifndef QMAKEGLOBALS_H -#define QMAKEGLOBALS_H +#pragma once #include "qmake_global.h" #include "proitems.h" @@ -159,5 +158,3 @@ private: }; QT_END_NAMESPACE - -#endif // QMAKEGLOBALS_H diff --git a/src/shared/proparser/qmakeparser.h b/src/shared/proparser/qmakeparser.h index 1da0271625..d44523d024 100644 --- a/src/shared/proparser/qmakeparser.h +++ b/src/shared/proparser/qmakeparser.h @@ -23,8 +23,7 @@ ** ****************************************************************************/ -#ifndef QMAKEPARSER_H -#define QMAKEPARSER_H +#pragma once #include "qmake_global.h" #include "proitems.h" @@ -226,5 +225,3 @@ Q_DECLARE_TYPEINFO(QMakeParser::Context, Q_PRIMITIVE_TYPE); #endif QT_END_NAMESPACE - -#endif // PROFILEPARSER_H diff --git a/src/shared/proparser/qmakevfs.h b/src/shared/proparser/qmakevfs.h index 18762d836c..8c387fe29d 100644 --- a/src/shared/proparser/qmakevfs.h +++ b/src/shared/proparser/qmakevfs.h @@ -23,8 +23,7 @@ ** ****************************************************************************/ -#ifndef QMAKEVFS_H -#define QMAKEVFS_H +#pragma once #include "qmake_global.h" @@ -65,5 +64,3 @@ private: }; QT_END_NAMESPACE - -#endif // QMAKEVFS_H diff --git a/src/shared/qtlockedfile/qtlockedfile.h b/src/shared/qtlockedfile/qtlockedfile.h index 44dbbaafab..52dfef64d0 100644 --- a/src/shared/qtlockedfile/qtlockedfile.h +++ b/src/shared/qtlockedfile/qtlockedfile.h @@ -23,8 +23,7 @@ ** ****************************************************************************/ -#ifndef QTLOCKEDFILE_H -#define QTLOCKEDFILE_H +#pragma once #include <QFile> @@ -69,5 +68,3 @@ private: }; } // namespace SharedTools - -#endif // QTLOCKEDFILE_H diff --git a/src/shared/registryaccess/registryaccess.h b/src/shared/registryaccess/registryaccess.h index 7b65160d60..f8620614c7 100644 --- a/src/shared/registryaccess/registryaccess.h +++ b/src/shared/registryaccess/registryaccess.h @@ -27,8 +27,7 @@ // qtcdebugger is currently registered for post-mortem debugging. // This is only needed on Windows. -#ifndef REGISTRYACCESS_H -#define REGISTRYACCESS_H +#pragma once #include <QString> #include <QLatin1String> @@ -75,5 +74,3 @@ QString debuggerCall(const QString &additionalOption = QString()); bool isRegistered(HKEY handle, const QString &call, QString *errorMessage, QString *oldDebugger = 0); } // namespace RegistryAccess - -#endif // REGISTRYACCESS_H |