Bladeren bron

LibGUI: Resolve cyclic inclusion

Application.h includes Widget.h which includes Application.h. I'm not entirely
sure what the semantics are in this case, but avoiding this seems to be the
safer approach. In this case, Widget does not actually use Application, so let's
just remove the unused include.
Ben Wiederhake 4 jaren geleden
bovenliggende
commit
1e7adf5cb6
3 gewijzigde bestanden met toevoegingen van 2 en 1 verwijderingen
  1. 1 0
      Userland/Applications/Run/main.cpp
  2. 1 0
      Userland/Demos/CatDog/main.cpp
  3. 0 1
      Userland/Libraries/LibGUI/Widget.h

+ 1 - 0
Userland/Applications/Run/main.cpp

@@ -28,6 +28,7 @@
 #include <AK/StringBuilder.h>
 #include <AK/Types.h>
 #include <AK/URL.h>
+#include <LibGUI/Application.h>
 #include <string.h>
 
 #include "RunWindow.h"

+ 1 - 0
Userland/Demos/CatDog/main.cpp

@@ -26,6 +26,7 @@
  */
 
 #include <LibCore/ElapsedTimer.h>
+#include <LibGUI/Application.h>
 #include <LibGUI/BoxLayout.h>
 #include <LibGUI/Icon.h>
 #include <LibGUI/Menu.h>

+ 0 - 1
Userland/Libraries/LibGUI/Widget.h

@@ -29,7 +29,6 @@
 #include <AK/JsonObject.h>
 #include <AK/String.h>
 #include <LibCore/Object.h>
-#include <LibGUI/Application.h>
 #include <LibGUI/Event.h>
 #include <LibGUI/Forward.h>
 #include <LibGUI/Margins.h>