1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 10:28:10 +00:00

LibGUI: Add forwarding header

This patch adds <LibGUI/Forward.h> and uses it a bunch.
It also dragged various header dependency reduction changes into it.
This commit is contained in:
Andreas Kling 2020-02-16 09:17:49 +01:00
parent 2e6ab58117
commit 2143da6434
115 changed files with 220 additions and 338 deletions

View file

@ -26,13 +26,11 @@
#pragma once
#include <AK/LogStream.h>
#include <AK/String.h>
#include <AK/Traits.h>
#include <LibGUI/Forward.h>
namespace GUI {
class Model;
class ModelIndex {
friend class Model;
@ -72,12 +70,7 @@ private:
void* m_internal_data { nullptr };
};
inline const LogStream& operator<<(const LogStream& stream, const ModelIndex& value)
{
if (value.internal_data())
return stream << String::format("ModelIndex(%d,%d,%p)", value.row(), value.column(), value.internal_data());
return stream << String::format("ModelIndex(%d,%d)", value.row(), value.column());
}
const LogStream& operator<<(const LogStream&, const ModelIndex&);
}