From e901daa441df4bcd185d51594d253025f1a257f1 Mon Sep 17 00:00:00 2001
From: Kubat <mael.martin31@gmail.com>
Date: Wed, 1 Sep 2021 16:29:18 +0200
Subject: [PATCH] BUILD: Fix header include order

TODO: Don't depend on the order of the includes
---
 src/UI/AboutWindow.hh               | 8 +++++---
 src/UI/DocumentViews/MpvControls.hh | 2 +-
 src/UI/MainWindow.cc                | 5 +++--
 src/UI/MainWindow.hh                | 4 ++--
 4 files changed, 11 insertions(+), 8 deletions(-)

diff --git a/src/UI/AboutWindow.hh b/src/UI/AboutWindow.hh
index 9bff80cf..73c8e640 100644
--- a/src/UI/AboutWindow.hh
+++ b/src/UI/AboutWindow.hh
@@ -1,13 +1,14 @@
 #pragma once
 
-#ifndef __cplusplus
-#error "This is a C++ header"
-#endif
+#include "../VivyApplication.hh"
+#include "../Lib/Utils.hh"
+#include "../Lib/Log.hh"
 
 namespace Vivy
 {
 class AboutWindow final : public QMainWindow {
     Q_OBJECT
+    VIVY_APP_LOGGABLE_OBJECT(AboutWindow, logger)
 
     QTabWidget *panels;
 
@@ -20,6 +21,7 @@ class AboutWindow final : public QMainWindow {
 
     // Simple QLabel for licences
     class LicenceLabel final : public QTextEdit {
+        VIVY_APP_LOGGABLE_OBJECT(LicenceLabel, logger)
     public:
         explicit LicenceLabel(QWidget *parent, const QString &url, const Qt::TextFormat format);
         ~LicenceLabel() noexcept override;
diff --git a/src/UI/DocumentViews/MpvControls.hh b/src/UI/DocumentViews/MpvControls.hh
index 51b1e127..5c792dc7 100644
--- a/src/UI/DocumentViews/MpvControls.hh
+++ b/src/UI/DocumentViews/MpvControls.hh
@@ -4,8 +4,8 @@
 #error "This is a C++ header"
 #endif
 
-#include "../../Lib/Utils.hh"
 #include "../../VivyApplication.hh"
+#include "../../Lib/Utils.hh"
 
 namespace Vivy
 {
diff --git a/src/UI/MainWindow.cc b/src/UI/MainWindow.cc
index d789104f..bfff0df4 100644
--- a/src/UI/MainWindow.cc
+++ b/src/UI/MainWindow.cc
@@ -1,10 +1,11 @@
+#include "../Lib/Utils.hh"
+#include "../VivyApplication.hh"
 #include "MainWindow.hh"
 #include "PropertyModel.hh"
 #include "VivyDocumentView.hh"
 #include "AboutWindow.hh"
 #include "VivyFileIconProvider.hh"
-#include "../Lib/Utils.hh"
-#include "../VivyApplication.hh"
+#include "AboutWindow.hh"
 
 #define DCL_MENU(menu, name) [[maybe_unused]] QMenu *menu##Menu = menuBar()->addMenu(name);
 
diff --git a/src/UI/MainWindow.hh b/src/UI/MainWindow.hh
index 7d375a94..5389ab56 100644
--- a/src/UI/MainWindow.hh
+++ b/src/UI/MainWindow.hh
@@ -10,10 +10,11 @@
 #include "DocumentViews/AudioVisualizer.hh"
 #include "VivyDocumentView.hh"
 #include "ScriptDocumentView.hh"
-#include "AboutWindow.hh"
 
 namespace Vivy
 {
+class AboutWindow;
+
 class MainWindow final : public QMainWindow {
     Q_OBJECT
 
@@ -112,5 +113,4 @@ private slots:
 
     void documentViewActionsChanged() noexcept;
 };
-
 }
-- 
GitLab