diff --git a/src/Config.cpp b/src/Config.cpp index 54d2ca0c..30c6e4ff 100644 --- a/src/Config.cpp +++ b/src/Config.cpp @@ -1,10 +1,10 @@ #include #include -#include "plugin-macros.generated.h" - #include "Config.h" +#include "plugin-macros.generated.h" + #define CONFIG_SECTION_NAME "OBSWebSocket" #define PARAM_ENABLED "ServerEnabled" diff --git a/src/WebSocketServer.cpp b/src/WebSocketServer.cpp index 6097ef1f..36d18c78 100644 --- a/src/WebSocketServer.cpp +++ b/src/WebSocketServer.cpp @@ -1,12 +1,12 @@ #include -#include "plugin-macros.generated.h" - #include "WebSocketServer.h" #include "obs-websocket.h" #include "Config.h" #include "requesthandler/RequestHandler.h" +#include "plugin-macros.generated.h" + WebSocketServer::WebSocketServer() : QObject(nullptr), _sessionMutex(QMutex::Recursive), @@ -35,7 +35,7 @@ WebSocketServer::WebSocketServer() : ) ); - blog(LOG_INFO, "test"); + blog(LOG_INFO, "cocks"); } WebSocketServer::~WebSocketServer() diff --git a/src/WebSocketSession.cpp b/src/WebSocketSession.cpp index f8ab9767..5d74d8e6 100644 --- a/src/WebSocketSession.cpp +++ b/src/WebSocketSession.cpp @@ -1,7 +1,7 @@ -#include "plugin-macros.generated.h" - #include "WebSocketSession.h" +#include "plugin-macros.generated.h" + WebSocketSession::WebSocketSession() : incomingMessages(0), outgoingMessages(0), diff --git a/src/forms/SettingsDialog.cpp b/src/forms/SettingsDialog.cpp index 42258dc3..896e5be9 100644 --- a/src/forms/SettingsDialog.cpp +++ b/src/forms/SettingsDialog.cpp @@ -4,13 +4,13 @@ #include #include -#include "../plugin-macros.generated.h" - #include "SettingsDialog.h" #include "../obs-websocket.h" #include "../Config.h" #include "../WebSocketServer.h" +#include "../plugin-macros.generated.h" + SettingsDialog::SettingsDialog(QWidget* parent) : QDialog(parent, Qt::Dialog), ui(new Ui::SettingsDialog) diff --git a/src/obs-websocket.cpp b/src/obs-websocket.cpp index 292126e8..f9917ca5 100644 --- a/src/obs-websocket.cpp +++ b/src/obs-websocket.cpp @@ -6,13 +6,13 @@ #include #include -#include "plugin-macros.generated.h" - #include "obs-websocket.h" #include "Config.h" #include "WebSocketServer.h" #include "forms/SettingsDialog.h" +#include "plugin-macros.generated.h" + // Auto release definitions void ___source_dummy_addref(obs_source_t*) {} void ___sceneitem_dummy_addref(obs_sceneitem_t*) {} diff --git a/src/plugin-macros.generated.h b/src/plugin-macros.generated.h index aadae584..3e776c01 100644 --- a/src/plugin-macros.generated.h +++ b/src/plugin-macros.generated.h @@ -16,8 +16,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see */ -#ifndef PLUGINNAME_H -#define PLUGINNAME_H +#pragma once #define OBS_WEBSOCKET_VERSION "5.0.0" @@ -26,5 +25,3 @@ with this program. If not, see #define QT_TO_UTF8(str) str.toUtf8().constData() #define blog(level, msg, ...) blog(level, "[obs-websocket] " msg, ##__VA_ARGS__) - -#endif diff --git a/src/plugin-macros.h.in b/src/plugin-macros.h.in index bb246bb2..565c1648 100644 --- a/src/plugin-macros.h.in +++ b/src/plugin-macros.h.in @@ -16,8 +16,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see */ -#ifndef PLUGINNAME_H -#define PLUGINNAME_H +#pragma once #define OBS_WEBSOCKET_VERSION "@CMAKE_PROJECT_VERSION@" @@ -26,5 +25,3 @@ with this program. If not, see #define QT_TO_UTF8(str) str.toUtf8().constData() #define blog(level, msg, ...) blog(level, "[obs-websocket] " msg, ##__VA_ARGS__) - -#endif diff --git a/src/requesthandler/RequestHandler.cpp b/src/requesthandler/RequestHandler.cpp index 20d8d0d4..9cacc390 100644 --- a/src/requesthandler/RequestHandler.cpp +++ b/src/requesthandler/RequestHandler.cpp @@ -1,3 +1,3 @@ -#include "../plugin-macros.generated.h" - #include "RequestHandler.h" + +#include "../plugin-macros.generated.h" diff --git a/src/requesthandler/rpc/Request.cpp b/src/requesthandler/rpc/Request.cpp index b2b7290e..a664568a 100644 --- a/src/requesthandler/rpc/Request.cpp +++ b/src/requesthandler/rpc/Request.cpp @@ -1,3 +1,3 @@ -#include "../../plugin-macros.generated.h" - #include "Request.h" + +#include "../../plugin-macros.generated.h" diff --git a/src/requesthandler/rpc/RequestResult.cpp b/src/requesthandler/rpc/RequestResult.cpp index ef11f7ad..b825d741 100644 --- a/src/requesthandler/rpc/RequestResult.cpp +++ b/src/requesthandler/rpc/RequestResult.cpp @@ -1,3 +1,3 @@ -#include "../../plugin-macros.generated.h" - #include "RequestResult.h" + +#include "../../plugin-macros.generated.h" diff --git a/src/utils/JsonUtils.cpp b/src/utils/JsonUtils.cpp index cd28376d..98045aed 100644 --- a/src/utils/JsonUtils.cpp +++ b/src/utils/JsonUtils.cpp @@ -1,7 +1,8 @@ +#include "Utils.h" // For AutoRelease types #include "../obs-websocket.h" -#include "Utils.h" +#include "../plugin-macros.generated.h" bool Utils::Json::JsonArrayIsValidObsArray(json j) {