From 6ed9553ca30447117ea3242e8499dec86a3861ec Mon Sep 17 00:00:00 2001 From: Gerion Entrup <32870336+gerion0@users.noreply.github.com> Date: Tue, 23 Feb 2021 14:25:32 +0100 Subject: [PATCH] Proto*: fix Error macro conflict (#1146) Fixes: #882 --- libsrc/protoserver/ProtoClientConnection.cpp | 7 ++++--- libsrc/protoserver/ProtoClientConnection.h | 8 +++++--- libsrc/protoserver/ProtoServer.cpp | 2 +- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/libsrc/protoserver/ProtoClientConnection.cpp b/libsrc/protoserver/ProtoClientConnection.cpp index e8bf1d91..051ca3e7 100644 --- a/libsrc/protoserver/ProtoClientConnection.cpp +++ b/libsrc/protoserver/ProtoClientConnection.cpp @@ -1,12 +1,13 @@ -// project includes -#include "ProtoClientConnection.h" - // qt #include #include #include #include +// project includes +#include "ProtoClientConnection.h" + + // TODO Remove this class if third-party apps have been migrated (eg. Hyperion Android Grabber, Windows Screen grabber etc.) ProtoClientConnection::ProtoClientConnection(QTcpSocket* socket, int timeout, QObject *parent) diff --git a/libsrc/protoserver/ProtoClientConnection.h b/libsrc/protoserver/ProtoClientConnection.h index 6d8ce378..e08658dc 100644 --- a/libsrc/protoserver/ProtoClientConnection.h +++ b/libsrc/protoserver/ProtoClientConnection.h @@ -1,14 +1,16 @@ #pragma once +// protobuffer PROTO +// protobuf defines an Error() function itself, so undef it here +#undef Error +#include "message.pb.h" + // util #include #include #include #include -// protobuffer PROTO -#include "message.pb.h" - class QTcpSocket; class QTimer; diff --git a/libsrc/protoserver/ProtoServer.cpp b/libsrc/protoserver/ProtoServer.cpp index 7bfc2954..fb45ae60 100644 --- a/libsrc/protoserver/ProtoServer.cpp +++ b/libsrc/protoserver/ProtoServer.cpp @@ -1,5 +1,5 @@ -#include #include "ProtoClientConnection.h" +#include // util #include