From cfabdbe74289dfce928a253ce7ad08d435f96b6c Mon Sep 17 00:00:00 2001 From: sawinglogz <3787776-sawinglogz@users.noreply.gitlab.com> Date: Tue, 21 Jul 2020 13:51:20 -0400 Subject: [PATCH] Improve gcc fix from d2fc5ac. Evidently gcc doesn't recognize inline forward declaration, but clang does. I wonder who is right? This was previously addressed by adding an #include. Instead, this patch adds a standalone forward declaration of the QXmlStreamReader/Writer classes. This has been tested and verified to compile with gcc and clang. --- oscar/SleepLib/deviceconnection.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/oscar/SleepLib/deviceconnection.h b/oscar/SleepLib/deviceconnection.h index f56bc031..352aab29 100644 --- a/oscar/SleepLib/deviceconnection.h +++ b/oscar/SleepLib/deviceconnection.h @@ -13,7 +13,6 @@ // connections to devices. For now it just supports serial ports. #include -#include #include #include @@ -263,6 +262,9 @@ public: * supports Bluetooth and BLE as well as serial. Such a class might then be * used instead of port "name" between DeviceConnectionManager and clients. */ +class QXmlStreamWriter; +class QXmlStreamReader; + class SerialPortInfo { public: