From d769e9d3e26f08abafc1a73892cc6e020a2aa4e7 Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Thu, 23 Apr 2020 15:07:11 +0300 Subject: [PATCH] Use forward declaration where possible. --- src/app/puzzle/vpuzzlelayout.cpp | 1 + src/app/puzzle/vpuzzlelayout.h | 4 +++- src/app/puzzle/xml/vpuzzlelayoutfilewriter.cpp | 4 ++++ src/app/puzzle/xml/vpuzzlelayoutfilewriter.h | 7 ++++--- 4 files changed, 12 insertions(+), 4 deletions(-) diff --git a/src/app/puzzle/vpuzzlelayout.cpp b/src/app/puzzle/vpuzzlelayout.cpp index c785c4046..538a8f1c2 100644 --- a/src/app/puzzle/vpuzzlelayout.cpp +++ b/src/app/puzzle/vpuzzlelayout.cpp @@ -26,6 +26,7 @@ ** *************************************************************************/ #include "vpuzzlelayout.h" +#include "vpuzzlelayer.h" //--------------------------------------------------------------------------------------------------------------------- VPuzzleLayout::VPuzzleLayout() : diff --git a/src/app/puzzle/vpuzzlelayout.h b/src/app/puzzle/vpuzzlelayout.h index 78ae62fab..7c59579fe 100644 --- a/src/app/puzzle/vpuzzlelayout.h +++ b/src/app/puzzle/vpuzzlelayout.h @@ -31,9 +31,11 @@ #include #include #include -#include "vpuzzlelayer.h" + #include "def.h" +class VPuzzleLayer; + // is this the right place for the definition? enum class FollowGrainline : qint8 { No = 0, Follow90 = 1, Follow180 = 2}; diff --git a/src/app/puzzle/xml/vpuzzlelayoutfilewriter.cpp b/src/app/puzzle/xml/vpuzzlelayoutfilewriter.cpp index 8c265e0c0..cfed06eca 100644 --- a/src/app/puzzle/xml/vpuzzlelayoutfilewriter.cpp +++ b/src/app/puzzle/xml/vpuzzlelayoutfilewriter.cpp @@ -27,6 +27,10 @@ *************************************************************************/ #include "vpuzzlelayoutfilewriter.h" +#include "vpuzzlelayout.h" +#include "vpuzzlelayer.h" +#include "vpuzzlepiece.h" +#include "layoutliterals.h" //--------------------------------------------------------------------------------------------------------------------- VPuzzleLayoutFileWriter::VPuzzleLayoutFileWriter() diff --git a/src/app/puzzle/xml/vpuzzlelayoutfilewriter.h b/src/app/puzzle/xml/vpuzzlelayoutfilewriter.h index 6f25e6a10..3eb90a5b8 100644 --- a/src/app/puzzle/xml/vpuzzlelayoutfilewriter.h +++ b/src/app/puzzle/xml/vpuzzlelayoutfilewriter.h @@ -31,9 +31,10 @@ #include #include "../ifc/xml/vabstractconverter.h" -#include "vpuzzlelayout.h" -#include "vpuzzlelayer.h" -#include "vpuzzlepiece.h" + +class VPuzzleLayout; +class VPuzzleLayer; +class VPuzzlePiece; class VPuzzleLayoutFileWriter : public QXmlStreamWriter {