build: use pragma once not ifndef def pattern for headers

This commit is contained in:
sithlord48 2024-10-06 09:03:26 -04:00 committed by Chris Rizzitello
parent e3ed711b98
commit 932ca44d75
43 changed files with 50 additions and 108 deletions

View file

@ -16,9 +16,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#if !defined(ACTION_H) #pragma once
#define ACTION_H
#include "KeySequence.h" #include "KeySequence.h"
@ -100,5 +98,3 @@ private:
typedef QList<Action> ActionList; typedef QList<Action> ActionList;
QTextStream &operator<<(QTextStream &outStream, const Action &action); QTextStream &operator<<(QTextStream &outStream, const Action &action);
#endif

View file

@ -16,9 +16,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#if !defined(ACTIONDIALOG_H) #pragma once
#define ACTIONDIALOG_H
#include <QDialog> #include <QDialog>
@ -54,5 +52,3 @@ private:
QButtonGroup *m_pButtonGroupType; QButtonGroup *m_pButtonGroupType;
}; };
#endif

View file

@ -15,8 +15,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#ifndef ADDCLIENTDIALOG_H #pragma once
#define ADDCLIENTDIALOG_H
#include "ui_AddClientDialogBase.h" #include "ui_AddClientDialogBase.h"
@ -57,5 +56,3 @@ private:
QLabel *m_pLabelCenter; QLabel *m_pLabelCenter;
int m_AddResult; int m_AddResult;
}; };
#endif // ADDCLIENTDIALOG_H

View file

@ -1,5 +1,4 @@
#ifndef APPDELEGATE_H #pragma once
#define APPDELEGATE_H
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
@ -21,4 +20,3 @@ extern "C" {
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
#endif // APPDELEGATE_H

View file

@ -15,8 +15,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#ifndef DATADOWNLOADER_H #pragma once
#define DATADOWNLOADER_H
#include <QByteArray> #include <QByteArray>
#include <QNetworkAccessManager> #include <QNetworkAccessManager>
@ -48,5 +47,3 @@ private:
QNetworkReply *m_pReply; QNetworkReply *m_pReply;
bool m_IsFinished; bool m_IsFinished;
}; };
#endif // DATADOWNLOADER_H

View file

@ -15,10 +15,7 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#pragma once
#if !defined(HOTKEY_H)
#define HOTKEY_H
#include <QList> #include <QList>
#include <QString> #include <QString>
@ -62,5 +59,3 @@ private:
typedef QList<Hotkey> HotkeyList; typedef QList<Hotkey> HotkeyList;
QTextStream &operator<<(QTextStream &outStream, const Hotkey &hotkey); QTextStream &operator<<(QTextStream &outStream, const Hotkey &hotkey);
#endif

View file

@ -15,10 +15,7 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#pragma once
#if !defined(HOTKEYDIALOG_H)
#define HOTKEYDIALOG_H
#include "Hotkey.h" #include "Hotkey.h"
#include "ui_HotkeyDialogBase.h" #include "ui_HotkeyDialogBase.h"
@ -46,5 +43,3 @@ protected:
private: private:
Hotkey &m_Hotkey; Hotkey &m_Hotkey;
}; };
#endif

View file

@ -16,9 +16,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#if !defined(KEYSEQUENCE_H) #pragma once
#define KEYSEQUENCE_H
#include <QList> #include <QList>
#include <QString> #include <QString>
@ -54,5 +52,3 @@ private:
static QString keyToString(int key); static QString keyToString(int key);
}; };
#endif

View file

@ -15,10 +15,7 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#pragma once
#if !defined(KEYSEQUENCEWIDGET__H)
#define KEYSEQUENCEWIDGET__H
#include <QPushButton> #include <QPushButton>
@ -75,5 +72,3 @@ private:
QString m_KeyPrefix; QString m_KeyPrefix;
QString m_KeyPostfix; QString m_KeyPostfix;
}; };
#endif

View file

@ -16,9 +16,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#if !defined(SERVERCONFIGDIALOG__H) #pragma once
#define SERVERCONFIGDIALOG__H
#include "ScreenSetupModel.h" #include "ScreenSetupModel.h"
#include "ServerConfig.h" #include "ServerConfig.h"
@ -78,5 +76,3 @@ private:
private slots: private slots:
void onChange(); void onChange();
}; };
#endif

View file

@ -15,10 +15,7 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#pragma once
#if !defined(TRASHSCREENWIDGET__H)
#define TRASHSCREENWIDGET__H
#include <QLabel> #include <QLabel>
@ -39,5 +36,3 @@ public:
signals: signals:
void screenRemoved(); void screenRemoved();
}; };
#endif

View file

@ -16,6 +16,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#pragma once
#include "arch/IArchString.h" #include "arch/IArchString.h"
#if HAVE_VSNPRINTF #if HAVE_VSNPRINTF

View file

@ -14,8 +14,7 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#ifndef DESKFLOW_PATH_H #pragma once
#define DESKFLOW_PATH_H
#include "String.h" #include "String.h"
@ -32,5 +31,3 @@ std::string path(const String &filePath);
} // namespace filesystem } // namespace filesystem
} // namespace deskflow } // namespace deskflow
#endif // DESKFLOW_PATH_H

View file

@ -20,5 +20,5 @@
// Prefix header for all source files of the 'deleteme' target in the 'deleteme' // Prefix header for all source files of the 'deleteme' target in the 'deleteme'
// project. // project.
// //
#pragma once
#include <Carbon/Carbon.h> #include <Carbon/Carbon.h>

View file

@ -15,6 +15,7 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#pragma once
#include "common/stdpre.h" #include "common/stdpre.h"

View file

@ -15,6 +15,7 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#pragma once
#include "common/stdpre.h" #include "common/stdpre.h"

View file

@ -15,6 +15,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#pragma once
#include <stdexcept> #include <stdexcept>
// apple declares _NOEXCEPT // apple declares _NOEXCEPT

View file

@ -15,6 +15,7 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#pragma once
#include "common/stdpre.h" #include "common/stdpre.h"

View file

@ -15,6 +15,7 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#pragma once
#include "common/stdpre.h" #include "common/stdpre.h"

View file

@ -15,6 +15,7 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#pragma once
#include "common/stdpre.h" #include "common/stdpre.h"

View file

@ -15,6 +15,7 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#pragma once
#include "common/stdpre.h" #include "common/stdpre.h"

View file

@ -15,6 +15,7 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#pragma once
#include "common/stdpre.h" #include "common/stdpre.h"

View file

@ -15,6 +15,7 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#pragma once
#if defined(_MSC_VER) #if defined(_MSC_VER)
#pragma warning(pop) #pragma warning(pop)

View file

@ -15,6 +15,7 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#pragma once
#if defined(_MSC_VER) #if defined(_MSC_VER)
#pragma warning(disable : 4786) // identifier truncated #pragma warning(disable : 4786) // identifier truncated

View file

@ -15,6 +15,7 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#pragma once
#include "common/stdpre.h" #include "common/stdpre.h"

View file

@ -15,6 +15,7 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#pragma once
#include "common/stdpre.h" #include "common/stdpre.h"

View file

@ -15,6 +15,7 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#pragma once
#include "common/stdpre.h" #include "common/stdpre.h"

View file

@ -15,6 +15,7 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#pragma once
#include "common/stdpre.h" #include "common/stdpre.h"

View file

@ -15,8 +15,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#ifndef DESKFLOW_CORE_CLIENTARGS_H #pragma once
#define DESKFLOW_CORE_CLIENTARGS_H
#include "ArgsBase.h" #include "ArgsBase.h"
@ -54,5 +53,3 @@ public:
std::string m_serverAddress; std::string m_serverAddress;
}; };
} // namespace deskflow } // namespace deskflow
#endif // DESKFLOW_CORE_CLIENTARGS_H

View file

@ -16,8 +16,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#ifndef CCLIENTTASKBARRECEIVER_H #pragma once
#define CCLIENTTASKBARRECEIVER_H
#include "arch/IArchTaskBarReceiver.h" #include "arch/IArchTaskBarReceiver.h"
#include "base/String.h" #include "base/String.h"
@ -94,5 +93,3 @@ private:
IArchTaskBarReceiver *createTaskBarReceiver( IArchTaskBarReceiver *createTaskBarReceiver(
const BufferedLogOutputter *logBuffer, IEventQueue *events); const BufferedLogOutputter *logBuffer, IEventQueue *events);
#endif

View file

@ -15,8 +15,7 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#ifndef DESKFLOW_DISPLAYINVALIDEXCEPTION_H #pragma once
#define DESKFLOW_DISPLAYINVALIDEXCEPTION_H
#include <stdexcept> #include <stdexcept>
#include <string> #include <string>
@ -27,5 +26,3 @@ public:
DisplayInvalidException(std::string msg) : std::runtime_error(msg) {} DisplayInvalidException(std::string msg) : std::runtime_error(msg) {}
}; };
#endif // DESKFLOW_DISPLAYINVALIDEXCEPTION_H

View file

@ -14,8 +14,7 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#ifndef DESKFLOW_LANGUAGESLANGUAGEMANAGER_H #pragma once
#define DESKFLOW_LANGUAGESLANGUAGEMANAGER_H
#include "base/String.h" #include "base/String.h"
#include "deskflow/AppUtil.h" #include "deskflow/AppUtil.h"
@ -76,5 +75,3 @@ public:
} // namespace languages } // namespace languages
} // namespace deskflow } // namespace deskflow
#endif // DESKFLOW_LANGUAGESLANGUAGEMANAGER_H

View file

@ -17,8 +17,7 @@
*/ */
#if WINAPI_XWINDOWS #if WINAPI_XWINDOWS
#ifndef XKBKEYBOARD_H #pragma once
#define XKBKEYBOARD_H
#include <X11/XKBlib.h> #include <X11/XKBlib.h>
#include <X11/extensions/XKBrules.h> #include <X11/extensions/XKBrules.h>
@ -46,6 +45,4 @@ public:
} // namespace deskflow } // namespace deskflow
#endif // XKBKEYBOARD_H
#endif // WINAPI_XWINDOWS #endif // WINAPI_XWINDOWS

View file

@ -15,8 +15,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#ifndef COMMANDTHREAD_H #pragma once
#define COMMANDTHREAD_H
#include <QObject> #include <QObject>
#include <QStringList> #include <QStringList>
@ -38,5 +37,3 @@ private:
QStringList m_Arguments; QStringList m_Arguments;
QString m_Input; QString m_Input;
}; };
#endif // COMMANDTHREAD_H

View file

@ -15,6 +15,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#pragma once
#include <QWidget> #include <QWidget>
#include <memory> #include <memory>

View file

@ -14,6 +14,7 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#pragma once
#include <QTcpSocket> #include <QTcpSocket>

View file

@ -16,8 +16,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#ifndef IMWINDOWSCLIPBOARDFACADE #pragma once
#define IMWINDOWSCLIPBOARDFACADE
#include "common/IInterface.h" #include "common/IInterface.h"
@ -31,5 +30,3 @@ public:
virtual void write(HANDLE win32Data, UINT win32Format) = 0; virtual void write(HANDLE win32Data, UINT win32Format) = 0;
virtual ~IMSWindowsClipboardFacade() {} virtual ~IMSWindowsClipboardFacade() {}
}; };
#endif

View file

@ -15,8 +15,7 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#ifndef MSWINDOWSPOWERMANAGER_H #pragma once
#define MSWINDOWSPOWERMANAGER_H
class MSWindowsPowerManager { class MSWindowsPowerManager {
public: public:
@ -32,5 +31,3 @@ public:
*/ */
void enableSleep(); void enableSleep();
}; };
#endif // MSWINDOWSPOWERMANAGER_H

View file

@ -14,6 +14,7 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#pragma once
#import <Cocoa/Cocoa.h> #import <Cocoa/Cocoa.h>

View file

@ -16,8 +16,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#ifndef OSXPOWERMANAGER_H #pragma once
#define OSXPOWERMANAGER_H
#include <IOKit/pwr_mgt/IOPMLib.h> #include <IOKit/pwr_mgt/IOPMLib.h>
@ -43,5 +42,3 @@ private:
// handler for assertion preventing the system from going to sleep // handler for assertion preventing the system from going to sleep
IOPMAssertionID m_sleepPreventionAssertionID = 0; IOPMAssertionID m_sleepPreventionAssertionID = 0;
}; };
#endif // OSXPOWERMANAGER_H

View file

@ -18,6 +18,7 @@
// ScreenSaver.framework private API // ScreenSaver.framework private API
// Class dumping by Alex Harper http://www.ragingmenace.com/ // Class dumping by Alex Harper http://www.ragingmenace.com/
#pragma once
#import <Foundation/NSObject.h> #import <Foundation/NSObject.h>

View file

@ -15,8 +15,7 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#ifndef XWINDOWSPOWERMANAGER_H #pragma once
#define XWINDOWSPOWERMANAGER_H
class XWindowsPowerManager { class XWindowsPowerManager {
public: public:
@ -36,5 +35,3 @@ public:
XWindowsPowerManager(const XWindowsPowerManager &) = delete; XWindowsPowerManager(const XWindowsPowerManager &) = delete;
XWindowsPowerManager &operator=(const XWindowsPowerManager &) = delete; XWindowsPowerManager &operator=(const XWindowsPowerManager &) = delete;
}; };
#endif // XWINDOWSPOWERMANAGER_H

View file

@ -14,8 +14,7 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#ifndef SERVER_CLIENTPROXY1_8_H #pragma once
#define SERVER_CLIENTPROXY1_8_H
#include "server/ClientProxy1_7.h" #include "server/ClientProxy1_7.h"
@ -31,5 +30,3 @@ public:
private: private:
void synchronizeLanguages() const; void synchronizeLanguages() const;
}; };
#endif // SERVER_CLIENTPROXY1_8_H